upoljw
Last Updated: February 25, 2016
·
514
· irakli

Load All Grunt Tasks

In your Gruntfile.js you can load all grunt- modules with one command and save yourself the trouble of writing grunt.loadNpmTasks for every grunt plugin, which can results in dozens of similar lines that need to be maintained in sync between your Gruntfile.js and package.json.

module.exports = function (grunt) {
  // load all grunt tasks
  require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);