It's breaking change + We don't want bower to run this way
Ok, so how to run something after component uninstall?
Can you explain, please, what is breaking?
Please read the hooks documentation: https://github.com/bower/bower/blob/master/HOOKS.md
Just finished re-reading :)
But haven't answer: why you reject postuninstall hook.
Or which 'best practice' you can advise to make same action?
The issue description wasn't clear on that, so I assumed you just have problems with hooks in general or want to add "grunt" posthook by default.
@sindresorhus Probably has an answer for your question as he implemented it.
No idea. I didn't implement it. Though there probably should be a postuninstall hook.
Definitely a +1 from me here.
Wiredep suggests adding a postinstall hook to add wiring to HTML files for new packages - it'd be great if there was a corresponding postuninstall to enable the removal operation.
Add postuninstall hook hoping for future support see: bower/bower#1451
I'm also using the post-installation-hook with bower-requirejs to update the config file. It's not a big issue to have unnecessary dependencies there after an uninstallation, but it's suboptimal...
It would definitely be nice to have this hook. 👍
+1 for me too, it would be great with wiredep
+1 for me too. Would very nice.
+1, simple automatisation and keeps things clean 👍
+1 , esp. for the use-case of wiredep (so it can automatically remove all the script / css tags in your HTML files after Bower uninstalls a thing)
+1, need postuninstall hook for grunt wiredep too.
Uh duh, yes we need this. If it will inject my css and js when I install something IT SHOULD remove it when I uninstall something. This just seems logical right? Am I missing something? I do appreciate all you do.. Just saying..
It's not as easy as you think to implement. PR with tests is appreciated :)
I understand. There is probably something I don't know about. I totally get that. As a developer I am often asked to do something that is estimated to take only 4 hours, a couple weeks later we found out that really was not as easy as the business owner thought it would be
+1 from me, too
As far as I have seen, there is already a PR #1681 maybe that one would need some support to pass the checks?
+1, though I found a temporary workaround using grunt-contrib-watch:
files: ['bower.json', '.bowerrc'],
And of course you can add templating tasks after wiredep, like jade for example, to generate the updated files.
+1 for wiredep for me too!
+1 for me, bower-requirejs user. I have to run bower-requirejs on every grunt build, but I'd much rather run it from a postuninstall hook.
+1. This hook combined with wiredep would be very helpful when completing the workflow for uninstalling packages via bower.
+1 for the postuninstall hook.
I'll +1 this aswell -> don't really see how you implement a postinstall hook without a postuninstall 💃
I agree, +1 to postuninstall hook, i endorse this.
Implemented in #2252 and will be released in bower 1.8