0.1.0 • Published 4 years ago

sdp-package v0.1.0

Weekly downloads
4
License
-
Repository
-
Last release
4 years ago

sdp-package

Project setup

yarn install

Compiles and hot-reloads for development

yarn serve

Compiles and minifies for production

yarn build

Lints and fixes files

yarn lint

Customize configuration

See Configuration Reference.

lerna 使用说明

创建新项目

lerna create <name> [loc] name: 包的名称 loc:包的位置

example:

// 创建包
lerna create abc
lerna create abcd packages/@sdp

// 关联命名空间的npm仓库地址(如果有私有地址)
npm adduser --registry=http://xxxx --scope=@spd

// 内部包依赖引用 以下即把@sdp/ui添加到@sdp/components
lerna add @sdp/ui --scope=@sdp/components

// 初始化包,有依赖会拉依赖
lerna bootstrap

// 查看更新
lerna changed

// build会遍历每个包的package.json,执行script里的build命令(如果有)
lerna run build

// 发布
lerna publish

文档说明

文档基于vuepress,支持分库生成文档,文档会读取库内README.md生成静态页面

// dev模式
npm run docs:dev xxx // xxx为库文件夹名
// build模式
npm run docs:build xxx // xxx为库文件夹名