可以进行凉亭&特拉维斯(Travis)启动的版本上的npm? [英] Possible to run bower & npm on Travis-initiated builds?

查看:97
本文介绍了可以进行凉亭&特拉维斯(Travis)启动的版本上的npm?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目正在GitHub上托管( https://github.com/njacobs5074/InOutBoard )作为构建的一部分,从Maven运行 npm bower 命令.这样做是为了确保安装了正确的JavaScript软件包-我的项目是带有JavaScript前端的Java Web应用.

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.

显然,由于我在PATH中安装了这些命令,因此这在我的开发箱上可以正常工作.只是不清楚如何与Travis一起使用.

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.

非常感谢

尼克

推荐答案

每个Travis 工作者已安装了node.js运行时和NPM,因此您可以使用它来安装Bower.
为了安装Bower并运行bower install,请将以下内容添加到.travis.yml:

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

这篇关于可以进行凉亭&特拉维斯(Travis)启动的版本上的npm?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆