How to use the registerMultiTask function from grunt
Find comprehensive JavaScript grunt.registerMultiTask code examples handpicked from public code repositorys.
GitHub: livedata/grunt-devcode
16 17 18 19 20 21 22 23 24
var _ = grunt.util._; var defaultEnv = {}; function init(grunt) { grunt.registerMultiTask('devcode', 'Remove code blocks based on environment configuration', function() { var context = _.extend({},defaultEnv,process.env), files; context.NODE_ENV = context.NODE_ENV || 'development';
7
20
2
GitHub: upstage/grunt-reverse
24 25 26 27 28 29 30 31 32 33
module.exports = function (grunt) { grunt.registerMultiTask('reverse', 'Deconstruct your HTML into components.', function () { var cb = this.async(); // Merge task-specific and/or target-specific options with these defaults. var options = this.options({});
2
4
7
146 147 148 149 150 151 152 153 154 155
```javascript // node_tasks/custom-task.js 'use strict'; module.exports = function(grunt) { grunt.registerMultiTask('custom-task', 'Make Grunt do something custom', function() { // ... }) } ```
1
3
3
+ 3 other calls in file
GitHub: wacky6/grunt-fontmin
8 9 10 11 12 13 14 15 16 17
let basename = require('path').basename let extname = require('path').extname let join = require('path').join module.exports = function(grunt){ grunt.registerMultiTask('fontmin', 'Minimize fonts', taskFontmin) } // grunt task function
1
2
2
grunt.file is the most popular function in grunt (372 examples)