[go: up one dir, main page]

Skip to content

zxiaosi/lerna

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lerna 项目

lerna.json 中添加 npmClient

{
  "$schema": "node_modules/lerna/schemas/lerna-schema.json",
  "version": "0.0.0",
  "npmClient": "yarn"
}

安装依赖

lerna clean
yarn install

package.json 添加快捷命令 yarn workspace <项目名> <命令>

{
  "scripts": {
    "bootstrap": "lerna bootstrap",
    "clean": "lerna clean",
    "run": "lerna run",
    "add": "lerna add",
    "publish": "lerna publish",
    "app": "yarn workspace app expo start",
    "mini": "yarn workspace mini run dev:weapp",
    "web": "yarn workspace web run dev"
  }
}