Kalyan
Kalyan

Reputation: 304

Gruntfile - splitting into multiple files

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

Upvotes: 1

Views: 472

Answers (0)

Related Questions