Ready-to-use patterns for applying `grunt-usemin` on Jade and other templating languages
npm install usemin-patterns> Ready-to-use patterns for applying grunt-usemin on Jade and other templating languages
Get it from npm.
``js`
npm i --save-dev grunt-usemin usemin-patterns
Use matchdep to load your Grunt plugins.
`js`
npm i --save-dev matchdep
Then, rather than all the calls to grunt.loadNpmTask(), use this one liner.
``
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
`js`
usemin: {
jade: 'src/views/*/.jade',
options: {
assetsDirs: ['public'],
patterns: {
jade: require('usemin-patterns').jade
}
}
}
jade: Same as the default patterns provided for html files, but available to jade` templates!
js: Patterns to match local (no protocol) images in JavaScript files.
MIT