How to use the loadTasks function from grunt

Find comprehensive JavaScript grunt.loadTasks code examples handpicked from public code repositorys.

30
31
32
33
34
35
36
37
38
39
      outputDirectory: outputDirectory
    }
  }
});

grunt.loadTasks(path.join(__dirname, '..', 'tasks'));

let tasksDone = false;

grunt.registerTask('done', 'done', function () {
fork icon104
star icon392
watch icon21

33
34
35
36
37
38
39
40
41
42

// Time how long tasks take. Can help when optimizing build times
require('time-grunt')(grunt);

// Load custom tasks
grunt.loadTasks('./tasks');

var config = loadConfig('./tasks/options');

grunt.initConfig(config);
fork icon9
star icon301
watch icon0

+ 11 other calls in file

7
8
9
10
11
12
13
14
15
16
// Helpers
// ---

// setup
var setup = function(){
  grunt.loadTasks(__dirname + '/../node_modules/grunt/tasks');
  // load custom tasks here
  //grunt.loadTasks(__dirname + '/tasks');
  // Initialize grunt with our own grunt.js config.
  // TODO: allow overrides
fork icon4
star icon10
watch icon3

29
30
31
32
33
34
35
36
37
38
    var tasks = pkg.devDependencies
    delete tasks.grunt
    for ( var task in tasks ) {
        grunt.loadNpmTasks(task)
    }
    grunt.loadTasks(folderPath)
}

function initConfigs(grunt, folderPath) {
    var config = {}
fork icon1
star icon3
watch icon3

+ 3 other calls in file

27
28
29
30
31
32
33
34
35
36
  "grunt-shell"
];

// Let's load all the pass through tasks 
for (var i = 0; i < plugins.length; i++) {
  grunt.loadTasks(join(__dirname, '../node_modules/' + plugins[i] + '/tasks'));
}

// Draw the help screen.
function displayHelp() {
fork icon0
star icon4
watch icon2

71
72
73
74
75
76
77
  grunt.initConfig(config);

  ///////////////////////////////////////////
  // TASKS
  ///////////////////////////////////////////
  grunt.loadTasks('tasks');
};
fork icon16
star icon0
watch icon2