Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 235
Nick Jacobs Avatar asked Mar 15 '15 15:03

Nick Jacobs


Video Answer


1 Answers

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
like image 172
Dror Bereznitsky Avatar answered Nov 14 '22 23:11

Dror Bereznitsky