Giter Club home page Giter Club logo

Comments (6)

lastzero avatar lastzero commented on May 20, 2024

As far as I remember, it is a known limitation of pluginify that it can not include views. This will be "fixed" with a future release.

from steal.

roelmonnens avatar roelmonnens commented on May 20, 2024

This would be nice to have!

from steal.

juristr avatar juristr commented on May 20, 2024

Is there no fix for this so far??

from steal.

jebaird avatar jebaird commented on May 20, 2024

Depending on which version of steal you have you can add the following lines to package views with in pluginfied scripts.

steal/build/pluginify/pluginify.js

in this method
s.build.pluginify.content = function(steal, param, opener){

add / replace

if( /\.ejs/.test(steal.rootSrc ) ){

                content = s.build.pluginify.getFunction(steal.text, 0)
                content = '(' + content +')(jQuery)'

            }else if (/steal[.\(]/.test(content)) {

                content = s.build.pluginify.getFunction(content, 0)

                if(content){
                    content =  "(" + content + ")(" + param + ")";
                }
            }

the end result might look something like this.

    //gets content from a steal
    s.build.pluginify.content = function(steal, param, opener){
        if (steal.buildType == 'fn') {
            // if it's a function, go to the file it's in ... pull out the content
            var index = funcCount[steal.rootSrc] || 0, contents = readFile(steal.rootSrc);
            funcCount[steal.rootSrc]++;
            return "(" + s.build.pluginify.getFunction(contents, index) + ")(" + param + ")";
        }
        else {
            //s.print('rooSrc ' + steal.rootSrc)
            var content = readFile(steal.rootSrc);
            //########## added by Jesse Baird 1/15/2013
            //test for view
            //##########
            if( /\.ejs/.test(steal.rootSrc ) ){

                content = s.build.pluginify.getFunction(steal.text, 0)
                content = '(' + content +')(jQuery)'

            }else if (/steal[.\(]/.test(content)) {

                content = s.build.pluginify.getFunction(content, 0)

                if(content){
                    content =  "(" + content + ")(" + param + ")";
                }
            }

            //s.print('steal ' + content )
            //make sure steal isn't in here
            return content;
        }
    };

Hopes this helps, sometime I would like to get around to patching the newest version of steal.

from steal.

justinbmeyer avatar justinbmeyer commented on May 20, 2024

I'm going to work on fixing this now. Thanks!

from steal.

justinbmeyer avatar justinbmeyer commented on May 20, 2024

Fixed here with the latest steal: f1b7e74

from steal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.