有没有办法使用 ember-cli 删除凉亭依赖项

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

我使用 ember-cli 安装了一个 Bower 依赖项,如下所示:

ember install:bower utf8

是否有等效的方法来卸载相同的依赖项?

到目前为止我已经使出了:

bower uninstall utf8

然后手动编辑了bower.json文件。有没有更正确的方法来做到这一点?或者按我的方式做有什么缺点吗?

是的,有。您只需要使用 --save--save-dev:

$ bower uninstall utf8 --save

当您使用 --save 时,它会被卸载并从 dependencies 部分中删除,--save-dev 会从 devDependencies.

中删除它

您可以使用与 bower install 甚至 npm install/npm uninstall 相同的标志。

编辑:

这是他们不想为 bower uninstall 创建别名的原因:https://github.com/ember-cli/ember-cli/issues/3163