Using bower with Visual Studio Tools for Apache Cordova

浪子不回头ぞ 提交于 2019-12-11 03:28:45

问题


When I create a blank Apache Cordova app, I got a directory structure like:

root www bower.json ...

From the project root directory, if I run "bower install ionic --save", the bower dependencies were all created in the project root while I expect them to go to www.

What is the best way use bower with VSTAC projects?


回答1:


You can create a .bowerrc file at the root that has the key directory:'www/bower_components' set, indicating that the files are placed inside www instead of the root.

Visual Studio should be able to now download the dependencies inside the www folder.

Note that VS2015 also has intellisense when editing bower.json and automatically installs the dependencies too !!




回答2:


Use the following command:

npm install -g "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\Packages\vs-tac"

It worked perfect for me.



来源:https://stackoverflow.com/questions/31640513/using-bower-with-visual-studio-tools-for-apache-cordova

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