1 Star 0 Fork 88

swimming8243 / LogicFlow

forked from LogicFlow / LogicFlow 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
developer.md 1.86 KB
一键复制 编辑 原始数据 按行查看 历史
胥涛 提交于 2023-02-13 10:54 . docs: update lerna path

developer tips

Start

我们选用 fork 仓库,然后提交 PR 的形式进行开发。

clone 自己 fork 后的仓库

git clone <your forked repository>

安装项目依赖

需要提前安装 yarn

npm run bootstrap

构建 types 并打包

LF 使用 monorepo 的形式进行管理,各个 package 之间存在依赖关系,所以需要先构建一次类型和源码才能进行开发。

npm run build:types

npm run build

启动本地开发

开发 core 包

cd packages/core
npm run dev

# 或跳过以上“构建部分”直接运行
npm run dev:core

开发 extension

cd packages/extension
npm run dev

# 或跳过以上“构建部分”直接运行
npm run dev:extension

项目配置修改

windows 和 mac 平台的换行不一致,windows 下是 CRLF,mac 下是 LF,因此 windows 系统下需要修改 eslint 规则: (如果 widows 配置了转换为 LF,此条不适用)

{
  rules: {
    'linebreak-style': ['error', 'unix'],
    // ...
  }
}

// 改为
{
  rules: {
    'linebreak-style': ['error', process.env.NODE_ENV === 'production' ? 'unix' : 'windows'],
    // ...
  }
}

Publish

clone 源码仓库

git clone git@github.com:didi/LogicFlow.git

源码打包

# 安装依赖
npm run bootstrap

# 构建 types
npm run build:types

# 打包
npm run build

更改 npm 官方源

npm config set registry https://registry.npmjs.org/

本地登陆 npm

npm login

# 查看是否已经登陆
npm whoami

为项目添加 tags

lerna version patch

lerna version 的详细使用方式见这里

发布版本

npm run lerna:publish

推 tag 到远端

git push origin --tags
TypeScript
1
https://gitee.com/swimming8243/LogicFlow.git
git@gitee.com:swimming8243/LogicFlow.git
swimming8243
LogicFlow
LogicFlow
master

搜索帮助