hlerenow / chameleon

Web visual programming engine. (lowcode)
https://hlerenow.github.io/chameleon/
Apache License 2.0
177 stars 19 forks source link

如何开发 chameleon ? #6

Closed StringKe closed 1 year ago

StringKe commented 1 year ago

https://github.com/hlerenow/chameleon/blob/master/DEV_README.md

中使用 yarn,但是项目中存在 pnpm-lock.yml 使用 pnpm 之后 lerna 似乎无法正确执行 lerna bootstrap

目前 lerna 新版本已经切换成 nx, 有考虑使用 nx 么?

hlerenow commented 1 year ago

文档写错了,已更新,目前用的 lerna-lit(不包含 nx功能) ,就是为了更干净些,没有复杂的外部依赖,lerna 只是用来 发包,不做其他的处理。

hlerenow commented 1 year ago
cd ./
pnpm i
pnpm run build
cd package/engine
pnpm run start
StringKe commented 1 year ago

还需要 lerna link 么?

我尝试

pnpm install 后

lerna bootstrap 会遇到错误

➜ lerna bootstrap
lerna notice cli v6.6.1
lerna ERR! EWORKSPACES Bootstrapping with pnpm is not supported. Use pnpm directly to manage dependencies: https://pnpm.io/cli/install
hlerenow commented 1 year ago

不需要link ,按照上面全部使用pnpm命令,不要使用lerna

StringKe commented 1 year ago

在提交的时候遇到

➜ git commit                                                   
✔ Preparing lint-staged...
✔ Hiding unstaged changes to partially staged files...
❯ Running tasks for staged files...
  ❯ package.json — 7 files
    ❯ packages/*/src/**/*.{js,jsx,ts,tsx} — 3 files
      ✖ eslint --fix --quiet [ENOENT]
    ❯ packages/*/src/**/* — 3 files
      ✖ prettier --write --ignore-unknown [KILLED]
↓ Skipped because of errors from tasks. [SKIPPED]
↓ Skipped because of errors from tasks. [SKIPPED]
✔ Reverting to original state because of errors...
✔ Cleaning up temporary files...

✖ eslint --fix --quiet failed without output (ENOENT).

✖ prettier --write --ignore-unknown failed without output (KILLED).
husky - pre-commit hook exited with code 1 (error)

的错误,暂时没找到方法,我尝试 pnpm prettier 或者 pnpm eslint 是存在的,不知道 lint-staged 是通过 pnpm 调度 eslint 和 prettier 还是通过全局,我全局上是不存在这两个工具的。

StringKe commented 1 year ago

全局安装这两个工具后正常,

hlerenow commented 1 year ago

提交在根目录下使用 pnpm run cz,不要使用 git commit