alanshaw / grunt-include-replace

Grunt task to include files and replace variables. Allows for parameterised includes.
MIT License
200 stars 45 forks source link

Local variables object refering #63

Closed ghost closed 8 years ago

ghost commented 8 years ago

Any way to refer whole local variables object in included file, to pass it in another include?

This seem to wrok fine:

processIncludeContents: function(contents, localVars) {
    var local = contents.replace(
        /@@local_vars/g,
        JSON.stringify(localVars)
    );
    return local;
},