创建nexus bower proxy host
比较简单,如下图:
安装bower && bower-nexus resolver
npm install -g bower-nexus3-resolver
or
npm install bower-nexus3-resolver --dev
npm install -g bower
配置nexus 私服解析地址
.bowerrc
{
"registry" : {
"search" : [ "http://hostip:8081/repository/bower-public/" ]
},
"resolvers" : [ "bower-nexus3-resolver" ]
}
项目使用
{
"name": "first",
"authors": [
"dalongrong <1141591465@qq.com>"
],
"description": "",
"main": "",
"license": "MIT",
"homepage": "",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"js-shortid": "shortid#^v0.1.1"
}
}
使用
bower install