Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postuninstall hook #1451

Closed
me-ascii opened this issue Aug 6, 2014 · 36 comments
Closed

postuninstall hook #1451

me-ascii opened this issue Aug 6, 2014 · 36 comments

Comments

@me-ascii
Copy link

me-ascii commented Aug 6, 2014

Please

"scripts": {
        "postinstall": "grunt",
        "postuninstall": "grunt"
    }
@sheerun
Copy link
Contributor

sheerun commented Aug 6, 2014

It's breaking change + We don't want bower to run this way

@sheerun sheerun closed this as completed Aug 6, 2014
@me-ascii
Copy link
Author

me-ascii commented Aug 6, 2014

Ok, so how to run something after component uninstall?
Can you explain, please, what is breaking?

@sheerun
Copy link
Contributor

sheerun commented Aug 6, 2014

Please read the hooks documentation: https://github.com/bower/bower/blob/master/HOOKS.md

@me-ascii
Copy link
Author

me-ascii commented Aug 6, 2014

Just finished re-reading :)
But haven't answer: why you reject postuninstall hook.
So why?
Or which 'best practice' you can advise to make same action?

@sheerun
Copy link
Contributor

sheerun commented Aug 6, 2014

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.

@sheerun sheerun reopened this Aug 6, 2014
@sindresorhus
Copy link
Contributor

No idea. I didn't implement it. Though there probably should be a postuninstall hook.

@sheerun sheerun added this to the 1.4.x milestone Aug 6, 2014
@nickcmaynard
Copy link

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.

@whyleee
Copy link

whyleee commented Jan 8, 2015

👍

@MattDiMu
Copy link

+1
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...

@silvenon
Copy link

It would definitely be nice to have this hook. 👍

@atropo
Copy link

atropo commented Feb 2, 2015

+1 for me too, it would be great with wiredep

@sonicparke
Copy link

+1 for me too. Would very nice.

@PeterKow
Copy link

PeterKow commented Feb 3, 2015

+1, simple automatisation and keeps things clean 👍

@mixmode
Copy link

mixmode commented Feb 4, 2015

+1

@ip2k
Copy link

ip2k commented Feb 4, 2015

+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)

@ahmadalfy
Copy link

+1, need postuninstall hook for grunt wiredep too.

@maccurt
Copy link

maccurt commented Mar 10, 2015

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..

@sheerun
Copy link
Contributor

sheerun commented Mar 11, 2015

It's not as easy as you think to implement. PR with tests is appreciated :)

@maccurt
Copy link

maccurt commented Mar 11, 2015

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

@pmentz
Copy link

pmentz commented Apr 7, 2015

+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?

@sdvim
Copy link

sdvim commented Apr 24, 2015

+1, though I found a temporary workaround using grunt-contrib-watch:

    watch: {
      bower: {
        files: ['bower.json', '.bowerrc'],
        tasks: ['wiredep']
      }
   }

And of course you can add templating tasks after wiredep, like jade for example, to generate the updated files.

@ghost
Copy link

ghost commented May 11, 2015

+1 for wiredep for me too!

@mwcz
Copy link

mwcz commented May 18, 2015

+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.

@anilnatha
Copy link

+1. This hook combined with wiredep would be very helpful when completing the workflow for uninstalling packages via bower.

@lukelarsen
Copy link

+1 for the postuninstall hook.

@kringon
Copy link

kringon commented Aug 17, 2015

I'll +1 this aswell -> don't really see how you implement a postinstall hook without a postuninstall 💃

@ghost
Copy link

ghost commented Aug 22, 2015

I agree, +1 to postuninstall hook, i endorse this.

@letalumil
Copy link

+1 for the postuninstall hook.

@Leotomas
Copy link

+1

4 similar comments
@guillermocorrea
Copy link

+1

@jimsheen
Copy link

jimsheen commented Oct 7, 2015

+1

@westonganger
Copy link

+1

@olso
Copy link

olso commented Oct 22, 2015

+1

@SubZero-0
Copy link

+1 :)

@leonardollobato
Copy link

+1

@sheerun
Copy link
Contributor

sheerun commented Apr 14, 2016

Implemented in #2252 and will be released in bower 1.8

@sheerun sheerun closed this as completed Apr 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests