Possible to run bower & npm on Travis-initiated builds?

做~自己de王妃 提交于 2019-12-10 13:46:44

问题


I have a project that I'm hosting at GitHub (https://github.com/njacobs5074/InOutBoard) that runs the npm and bower commands from Maven as part of the build. This is done to ensure that the proper JavaScript packages are installed - my project is a Java web app with a JavaScript front-end.

Obviously this works fine on my dev box since I have these commands installed an in my PATH. Just not clear on how to get this working with Travis.

Thanks much,

Nick


回答1:


Every Travis worker has a node.js runtime and NPM installed, so you can use it to install Bower.
In order to install Bower and run bower install add the following to .travis.yml:

before_script:
  - npm install -g bower
  - bower install


来源:https://stackoverflow.com/questions/29062493/possible-to-run-bower-npm-on-travis-initiated-builds

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