jit-grunt icon indicating copy to clipboard operation
jit-grunt copied to clipboard

Does not support renameTask

Open ColinEberhardt opened this issue 9 years ago • 6 comments

I've added jit-grunt to my gruntfile and it works just fine however, if I rename one of my grunt tasks:

grunt.renameTask('concat_css', 'concatCss');

The build fails:

>> Cannot rename missing "concat_css" task.

I presume renameTask is not currently supported?

ColinEberhardt avatar Oct 01 '15 05:10 ColinEberhardt

+1

cmacdonnacha avatar Oct 17 '15 19:10 cmacdonnacha

Any updates here?

havenchyk avatar Dec 16 '15 13:12 havenchyk

Sorry, I was busy... I don't feel the importance to renameTask, and maybe it is a complex.

PR please.

shootaroo avatar Jan 05 '16 13:01 shootaroo

@shootaroo I don't think anyone here understand how to implement it. Thanks anyway :smile:

havenchyk avatar Jan 05 '16 13:01 havenchyk

Also actual for me, i want to rename 'watch' task to 'delta' and execute it in my custom 'watch', which may contain some another stuff.

Thank you!

BParnikel avatar Jan 06 '16 23:01 BParnikel

A cheap workaround would be to load the task you need to rename by hand:

grunt.loadNpmTasks('grunt-bump');
grunt.task.renameTask('bump', '_bump');

Since it has to be renamed, it has to be loaded every time grunt runs.

One plausible way jit-grunt could fix that would be to somehow overwrite the renameTask function to allow renaming of non existing tasks.

SpazzMarticus avatar Feb 29 '16 06:02 SpazzMarticus