http://ctrl-d.ro/autor/andreipfeiffer/
pipe support with node-task
grunt.registerTask('customTask', function() { // task logic };
grunt.registerTask('customTask', function() {
// task logic };
> tasks/customTask.js // use commonJS syntax module.exports = function( grunt ) { grunt.registerTask('customTask', function() { // task logic }; };
> tasks/customTask.js
// use commonJS syntax
module.exports = function( grunt ) {
// task logic
};
> Gruntfile.js grunt.loadTasks('tasks'); // pass folder name, containing tasks
> Gruntfile.js
grunt.loadTasks('tasks');
// pass folder name, containing tasks
grunt.registerTask('customTask', function() { // set grunt.config.set('propertyName', 'some data'); // get var name = grunt.config.get('propertyName'); };
// set
grunt.config.set('propertyName', 'some data');
// get
var name = grunt.config.get('propertyName');
grunt.initConfig({ taskName: '<%= propertyName %>' });
grunt.initConfig({
taskName: '<%= propertyName %>'
});
By Andrei Pfeiffer