0.0.0 • Published 1 year ago

zcb-ui v0.0.0

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

支出宝私有库地址:http://npm-hub.zhichubaohost.com/

zcb-components

简介

这是一款基于 vue +elemnet plus ui 框架开发的基础 UI 组件

目录

examples 为原来的src目录 用于演示,
packages 目录为打包目录  开发好的 组件放到packages中,
lib 目录为打包好的js css   命令为:npm run lib 打包

用法

  1. 安装依赖
npm install --save zcb-components
  1. 引入并使用
// 引入npm包的公共js
import zcbs from 'zcb-components' // 引入了组件
Vue.use(zcbs)

1.管理 npm 仓库源 - 安装 nrm

# 全局安装nrm
$ npm install -g nrm
# 添加私有库
$ nrm add zcb http://npm-hub.zhichubaohost.com/
# 查看现有的npm源
$ nrm ls    输入命令后如下:
* npm -------- https://registry.npmjs.org/
  yarn ------- https://registry.yarnpkg.com/
  cnpm ------- http://r.cnpmjs.org/
  taobao ----- https://registry.npm.taobao.org/
  nj --------- https://registry.nodejitsu.com/
  npmMirror -- https://skimdb.npmjs.com/registry/
  edunpm ----- http://registry.enpmjs.org/
  zcb--  http://npm-hub.zhichubaohost.com/
#设置npm源
$ nrm use zcb

2.npm 包发布

# 注册用户
$ npm adduser 输入命令后如下:
   npm notice Log in on  http://npm-hub.zhichubaohost.com/
   Username: yourusername
   Password:
   Email: (this IS public) xxxxxx@qq.com
   Logged in as yourusername on  http://npm-hub.zhichubaohost.com/.
# 登录用户
$ npm login (如未登录先登录)
# 发布npm
$ npm publish
npm unpublish 包名 --force //强制删除
# 查看当前登录用户
$ npm who am i

3.nrm 安装和 npm 发布参考链接

verdaccio 搭建私有 npm 服务器:

(https://www.jianshu.com/p/0c905e4a8b70)
[https://www.jianshu.com/p/9e9fe62e8e39]

4.如果没有安装 nrm 可以使用原生

npm config set registry=http://npm-hub.zhichubaohost.com/ (设置npm库源地址)
npm config get registry (查看npm库源地址)
npm publish (发布开发的npm包)
npm unpublish zcb-components@0.0.0 --force (删除npm指定版本的包 - 小心误操作慎用)
npm unpublish zcb-components --force  (删除npm库的所有版本的包 - 小心误操作慎用)

5.如果开发调试时

npm link 发布到本地 npm unlink zcb-components 项目中解除远程关联 npm link zcb-components 项目中下载包