This is a monorepo containing sub-packages:
- @mirrormedia/lilith-draft-renderer: see
packages/draft-renderer - @mirrormedia/lilith-draft-editor: see
packages/draft-editor - @mirrormedia/lilith-core: see
packages/core - @mirrormedia/lilith-editools: see
packages/editools - @mirrormedia/lilith-mesh: see
packages/mesh - @mirrormedia/lilith-mirrormedia: see
packages/mirrormedia - @mirrormedia/lilith-readr: see
packages/readr - @mirrormedia/lilith-openrelationship: see
packages/openrelationship - @mirrormedia/lilith-mirrordaily: see
packages/mirrordaily
This monorepo adopts husky, lint-staged and yarn workspaces.
husky and lint-staged will
- run eslint for needed sub-packages before
git commit
yarn workspaces will install dependencies of all the sub-packages wisely and effienciently.
Before modifying sub-packages' source codes, make sure you install dependencies on root.
We need husky and lint-staged installed first.
yarn install
A1: 如果錯誤訊息與 @mirrormedia/lilith-core 有關,可嘗試以下步驟來解決
- 在
packages/draft-renderer底下執行yarn build - 在
packages/draft-editor底下執行yarn build - 在
packages/core底下執行yarn build - 在 root 底下執行
yarn install
確保 local 端有 @mirrormedia-/lilith-core 相關的檔案可以讓其他 package 載入。
A2: 因為 yarn workspace 與個別 package 的 postinstall script 在 Windows 環境上是有問題的 1,解法方式是安裝階段時不執行 postinstall script,等安裝完畢時,再到個別 package 底下去執行 postinstall script,步驟如下:
- 在 root 底下執行
set WINDOWS_ONLY=true && yarn install - 到目標 package 底下執行
set WINDOWS_ONLY=false && yarn postinstall