一个基于RushStack的monorepo CBB实践;A common building block power on RushStack
MIT License
Common building block(CBB) monorepo powered by RushStack
monorepo
中需要复制粘贴到每个项目下的配置文件。让模板保持同步是个麻烦事。一旦需要变动,如果你有百个项目,你需要数百次重复操作。.../.../other-project
的相对路径引用文件)。这条原则有助于实现 Rush
的子集构建和增量构建功能,甚至当你不想使用 Rush
后,它也可以非常轻易地在 monorepo
间迁移项目。出于这个原因,我们不鼓励在 monorepo
仓库的根目录下放一个 .eslintrc.js
文件并让所有项目都借此调用 ESLint
.Categary/Project
# good
.
├── rush.json
├── Categary1
│ ├── ProjectA
│ └── ProjectB
├── Categary2
│ └── ProjectC
├── Categary3
│ ├── ProjectD
│ └── ProjectE
assets
svg
、img
、iconfont
etcpublished
cli
NodeJs
common
rush config
、git-hooks
etccomponents
vue2
and vue3
or otheresm
and umd
formatlibraries
es6
or ts
esm
format and do not any degrade,so you need transform it to other format and polyfill for other browserrun-control
.prettierrc
、.eslintrc
、.stylelintrc
etctools
apps
vue3
and vite
production
published
internal
rush init-project
to make it happen.vite
to bundle components
and libraries
build
and test
script use heft
,vite
just use as development server for libraries
.components
no adjustment.vite
output .d.ts
for components
tools
templatecomponents
templatelibraries
templateassets
templatevitest
replace @heft/jest
@heft/jest
in libraries
projectphase_build
js
as esm
instead of cjs
"type":"module"
in package.json
vue-demi
vue-demi
project templaterush change
rush publish --apply --publish --include-all --target-branch main --add-commit-details --set-access-level public
rush publish --apply --target-branch main --publish --set-access-level public