当前位置:网站首页>发布自定义插件到本地服务器
发布自定义插件到本地服务器
2022-04-23 06:05:00 【念雅】
一、启动nexus
进入解压包所在位置 nexus-3.29.1-01,下bin目录,打开cmd窗口,输入
.nexus/start
二、先build,再去发布
在项目中 npm i (注意镜像地址 npm 或者taobao )
获取镜像地址
npm config get registry
设置镜像地址
npm config set registry https://registry.npm.taobao.org
在项目中
npm build
进入生成的插件目录 这个名字是在package.json里面配置的smallbutton
cd smallbutton
npm publish
注意:没有登录的,先 切换镜像,再发布
npm config set registry=http://服务器地址:8081/repository/npm-internal/
npm login -registry=http://服务器地址:8081/repository/npm-internal/
输入用户名、密码、邮箱
发布成功!
进入到需要用到插件的项目,package.json 里面加入
"smalllbutton":'^1.0.1'
npm i smallbutton
注意插件文件名不可以有大写,插件名字必须为小写,function 组件得函数名可以为大写
import {SmallButton} from 'smallbutton'
<SmallButton/>
版权声明
本文为[念雅]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_43865681/article/details/112791257
边栏推荐
猜你喜欢
Analysis of Rdam principle
Dolphinscheduler调度sql任务建表时The query did not generate a result set异常解决
Redis practice notes and source code analysis
Information:2021/9/29 10:01 - Build completed with 1 error and 0 warnings in 11s 30ms Error异常处理
Prometheus Cortex多租户读写的实现
High performance gateway for interconnection between VPC and IDC based on dpdk
Thanos Compactor组件使用
Redis FAQ
Prometheus的relabel_configs和metric_relabel_configs解释及用法示例
Using Prom label proxy to implement label based multi tenant reading of Prometheus thanos
随机推荐
RAC环境数据库节点参数设置不当导致监听无法连接问题排查
基于EMR离线数据分析-反馈有礼
Dolphinscheduler调度spark任务踩坑记录
Openvswitch compilation and installation
异常记录-10
异常记录-17
Introduction to RDMA network
RAC环境集群组件gpnp未启动成功问题分析
oracle创建表空间和修改用户默认表空间
Kubernetes coredns FAQ reference
Build a cloud blog based on ECS (send blessings on the cloud Xiaobao code and draw iphone13 for free)
oracle 修改默认临时表空间
Practice using polardb and ECs to build portal websites
How does VirtualBox modify the IP network segment assigned to the virtual machine in the "network address translation (NAT)" network mode
pg库查看某模式下某表的分布键
Prometheus cortex Architecture Overview (horizontally scalable, highly available, multi tenant, long-term storage)
select命令产生redo日志问题的分析
Ansible basic commands, roles, built-in variables and tests judgment
Oracle redo log产生量大的查找思路与案例
JS function package foreach use return can not jump out of the outer function