SBoudrias / gruntfile-editor

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

better loadNpmTask injection #24

Closed edoput closed 10 years ago

edoput commented 10 years ago

I managed to add string arrays as an input for loadNpmTask; I also modified the existing test and README

SBoudrias commented 10 years ago

Hey, thanks for the PR.

Although, I'm not sure I wish to merge it because the API although simpler to update manually will not be as clear for new Grunt user

["grunt-contrib-uglify", "grunt-contrib-concat"].forEach(grunt.loadNpmTasks); feels verbose and isn't super useful.

edoput commented 10 years ago

To me what's important is the new API. The possibility to input an array instead of manually repeating myself is what I need, what do you think about that?

SBoudrias commented 10 years ago

It'd be great if you can squash your commits together after passing through the comments.

Also, I think you can add a more precise unit test testing correct behavior of both signature of editor.loadNpmTask (string and array)

edoput commented 10 years ago

I wrote the new tests and went trough your comments, let me know.

Bye

SBoudrias commented 10 years ago

Awesome, thanks!