Search code examples
ember.jsbowerember-cli

Is there a way to remove bower dependencies using ember-cli


I installed a bower dependency using ember-cli as follows:

ember install:bower utf8

Is there an equivalent way to uninstall the same dependency?

So far I have resorted to:

bower uninstall utf8

And then manually edited the bower.json file. Is there a more correct way to do this? Or are there any drawbacks of doing it my way?


Solution

  • Yes, there is. You just have to use --save or --save-dev:

    $ bower uninstall utf8 --save
    

    When you use --save, then it's uninstalled and removed from dependencies section, and --save-dev removes it from devDependencies.

    You can use the same flags with bower install or even npm install/npm uninstall.

    EDIT:

    Here's a reasoning why they don't want to make an alias for bower uninstall: https://github.com/ember-cli/ember-cli/issues/3163