Grunt Template Helper: Progeny
Get style/template dependency paths
$ npm install --save-dev grunt-template-progeny
Note: If you are using a task loader like load-grunt-tasks
or load-grunt-config
, no further setup is required.
// Gruntfile.js
module.exports = function(grunt) {
// require it and pass in the grunt instance.
// config is optional
require('grunt-template-progeny')(grunt, config);
grunt.initConfig();
};
For more information about custom configuration see Progeny's Documentation.
Progeny currently has support for jade
, stylus
, less
, sass
/scss
, and css
files.
Returns: string
- glob ready list of paths
Param | Type | Description |
---|---|---|
path | string |
Source path or grunt template |
The following is a sample grunt-contrib-watch
configuration.
It will watch the given source file and all of its dependencies.
{
less: {
options: { reload:true }
files: ['<%= grunt.template.progeny("path/to/source.less") %>']
tasks: ['less']
}
}
The following is a sample gruntfile.js
configuration segment
You may also use template variables:
// config
{
less: {
main: {
src: "path/to/source.less",
dest: "path/to/result.css"
}
},
watch: {
less: {
options: { reload:true }
files: ['<%= grunt.template.progeny(less.main.src) %>']
tasks: ['less']
}
}
}
MIT © Luis Aleman