node-underscorify
node-underscorify copied to clipboard
Doesn't Appear to Observe Options Passed via grunt-browserify
I'm attempting to pass templateSettings via grunt-browserify. My Gruntfile
looks like:
var template_opts = {
interpolate: /\{\{(.+?)\}\}/g,
escape: /\{-(.+?)\}/g,
evaluate: /<%(.+?)%>/g
};
module.exports = function( grunt ) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
browserify: {
spec: {
options: {
transform: [['node-underscorify', { templateSettings: template_opts }]],
browserifyOptions: {
debug: true
}
},
src: ['app/config.js','spec/**/*-spec.js'],
dest: 'spec/bundle.js'
}
}
});
grunt.loadNpmTasks( 'grunt-browserify' );
};
The compiled code doesn't use the specified delimiters.
This is not a node-underscorify
issue. No options are being passed from grunt-browserify
.
Dug deeper. This is an issue with node-underscorify
. The options configured in the Gruntfile (above) are being passed to the transform as a second argument.