SBoudrias / gruntfile-editor

An API to modify a Gruntfile.js content
MIT License
40 stars 10 forks source link

#loadNpmTasks(): Allow multiple calls with same task #25

Closed FallenRiteMonk closed 9 years ago

FallenRiteMonk commented 10 years ago

Hy,

I noticed that running the loadNpmTast multiple times with the same parameter leads to the task beeing loaded multiple times in the created Gruntfile.

So calling

gruntfile.loadNpmTasks('grunt-contrib-watch');
gruntfile.loadNpmTasks('grunt-contrib-watch');

leads to

grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-watch');

in the Gruntfile.

edoput commented 9 years ago

If you have to call gruntfile.loadNpmTasks multiple time please use an array instead