Create easy monorepo
with typescript
- No dependencies
- Maintain monorepo with ease
- Created for Typescript
- 2.93 KB bundle
npm i -g @rxdi/monorepo
repo create
Following structure will be created
--root
-src
-@apps
-@lib
-@shared
repo lib 'lib-name'
Will create library
empty module inside root/src/@lib
repo shared 'lib-name'
Will create shared
empty module inside root/src/@shared
repo compile
Watch mode
repo compile --watch
repo run
repo run frontend
repo.json
is default file
You can specify more complex runner stacks by passing -c
argument with path to custom
json file like so: repo run frontend -c ./my-custom.json
or running whole stack repo run -c ./my-custom.json
{
"stacks": {
"frontend": {
"options": {
"cwd": "./src/@apps/frontend/",
"depends": ["gateway"],
"signal": "Built in"
},
"commands": {
"clean": "rm -rf .cache",
"link": "gapi daemon link graphql",
"run": "npm start"
}
},
"api": {
"options": {
"signal": "SIGNAL_MAIN_API_STARTED",
"cwd": "./src/@apps/api/"
},
"commands": {
"clean": "rm -rf .cache",
"link": "gapi daemon link graphql",
"run": "npm start"
}
},
"gateway": {
"options": {
"signal": "SIGNAL_GATEWAY_STARTED",
"depends": ["api", "vscode-cloud"],
"cwd": "./src/@apps/gateway/"
},
"commands": {
"clean": "rm -rf .cache",
"link": "gapi daemon link graphql",
"run": "npm start"
}
},
"vscode-cloud": {
"options": {
"signal": "SIGNAL_VS_CODE_STARTED",
"cwd": "./src/@apps/vscode-cloud/"
},
"commands": {
"clean": "rm -rf .cache",
"link": "gapi daemon link graphql",
"run": "npm start"
}
},
"compile": {
"options": {
"cwd": ".",
"depends": ["frontend"]
},
"commands": {
"compile": "repo compile --watch"
}
}
}
}