nexus bower 集成使用

创建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

参考文档

https://help.sonatype.com/repomanager3/bower-repositories

posted on 2018-05-28 14:13  荣锋亮  阅读(470)  评论(0编辑  收藏  举报

导航