问题
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