build-workflow
Advanced tools
Changelog
v3.0.5
add options.extendTwig
callback to twig grunt task - f753a12, royriojas, 30/03/2015 15:16:53
extendTwig
allows the consumer to extend twig, adding new filters or tags.
For example adding a filter:
pages: {
options: {
extendTwig: function ( Twig ) {
Twig.extendFilter( 'processResource', function ( value, args ) {
args = args || [];
// add the version to all the required css or js files
var addVersion = clsc( args[ 0 ], true );
value = addVersion ? revFile(value, buildNumber) : value;
return value;
} );
},
cwd: 'src/pages/'
},
src: [ 'src/pages/**/*.twig' ],
dest: 'dist/pages/'
}