nexus bower 集成使用

时间:2022-06-05 23:56:04

创建nexus bower proxy host

比较简单,如下图:
nexus bower 集成使用

安装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

nexus bower 集成使用

参考文档

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