tschaub / grunt-newer

Configure Grunt tasks to run with newer files only.
https://npmjs.org/package/grunt-newer
MIT License
945 stars 53 forks source link

Run newer on aliases #59

Closed FagnerMartinsBrack closed 9 years ago

FagnerMartinsBrack commented 9 years ago

Currently the following code does not work:

grunt.registerTask( "validate", [ "jshint", "jscs" ] );
grunt.registerTask( "default", [ "newer:validate" ] );

It throws Object.keys called on non-object The expected here would be to run newer:jshint and newer:jscs, even though they are not prefixed as newer:jshint and newer:jscs in the alias.

tschaub commented 9 years ago

Thanks for the report @FagnerMartinsBrack. Grunt doesn't provide a straightforward way of getting the task names associated with a particular alias. So I think it might just have to be a known limitation that you can't use the newer prefix with aliases. At least things won't fail in an odd way with #61.

I'm happy to revisit this if someone points out a (nice) way to get task names associated with an alias.