Choose bower install directory

不想你离开。 提交于 2019-11-29 02:47:34

Actually the .bowerrc file does work, this was an issue with my IDE not saving the file properly:

{
  "directory" : "public/components"
}

I'm still wondering why componentsDirectory still doesn't work in component.json, though.

While you can happily use Bower to manage the dependencies of your own personal projects, primarily the component.json is a description of your project for other people. If you share a component through the Bower registry the component.json goes with it to describe the dependencies. That is why your own local preferences like where to install components don't belong in there.

Another way to change installation directory temporarily is using --config option in command line:

bower install jquery --config.directory=/path/to/your/components

If you are creating this file in Notepad++, make sure the Encoding is set to "Encode in UTF-8 without BOM" and save as file type "Any".

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!