1

I am in the process of converting huge Gruntfile into multiple small script files. I am using "load-grunt-config" for that.

I have created individual files for each task and placed them in grunt folder.

Register task in gruntFile:

grunt.registerTask('default', ['concat', 'uglify', 'sass']);

Changed above register task to following in aliases.json

{
    "default": [
        "concat",
        "uglify",
        "sass"
    ]
}

I have to define one more task in alaiases.json. Respective code in gruntfile is as follows.

grunt.registerTask('watch:lint', function() {
    grunt.config.set('watch.dev.tasks', 'lint');
    grunt.task.run('watch:dev');
});

Function in above register task can't be defined in aliases.json. Where and how it should specified when using multiple script files?

Thanks in Advance

Kalyan
  • 294
  • 3
  • 10
  • 1
    Found answer in following thread http://stackoverflow.com/questions/18637827/registering-grunt-tasks-whose-code-is-located-in-external-javascript-files – Kalyan Feb 28 '17 at 14:51

0 Answers0