@tsailab/cli
v0.4.0
Published
Tsai-cli - modern, fast, powerful node.js web framework (@cli) extends from nestjs
Downloads
51
Readme
Description
The Tsai CLI is extends from nestjs cli. It is a command-line interface tool that helps you to initialize, develop, and maintain your Nestjs monorepo workspace. It assists in multiple ways, including scaffolding the project, serving it in development mode, and building and bundling the application for production distribution. It embodies best-practice architectural patterns to encourage well-structured apps.
The CLI works with schematics, and provides built in support from the schematics collection at @tsailab/schematics.
Tsai monorepo workspace struct
━┳ Root
┣━┳ apps // micro apps
┣━━ tsai-admin // admin service
┣━━ some-app
┗━┳ libs // project libaraies
┣━━ biz-lib // lib common depence
┗━┳ packages // public libaraies
┣━━ common // lib common depence
┣━━ core // tsai core feature
┣━━ uc-orm //
┣━ package.json
┣━ pnpm-workspace.yaml
·
·
·
Installation
$ npm install -g @tsailab/cli
- show commands help
$ tsai -h
$ tsai g --help
Usage
How create a new monorepo project
Create an monorepo workspace use tsai step by step
- create application
$ tsai new tsai-plat --directory ./mono-root
- convert this project to monorepo workspace
$ cd mono-root
$ tsai g app tsai-admin
- create project library
tsai g lib biz-lib
- create an public package
tsai g lib core -P
:boom: :boom: :boom: :star2: :star2: :two_hearts: :two_hearts: :two_hearts:
:star: :star: :star: :star: :star: :star: :star: :star:
Learn more in the Nestjs official documentation.
Use pnpm management your packages
# add package denpendency
pnpm add vue -Sw
# add package to some lib
pnpm -F core add lodash -D --save-peer
# excute npm scripts
pnpm -F core build
Learn more commands in the PNPM offcial documentation
# pnpm-workspace.yaml
packages:
- 'packages/*'
Stay in touch
- Twitter - @lamborghini171
:revolving_hearts::revolving_hearts::revolving_hearts: :raising_hand: :raising_hand: :raising_hand: :raising_hand: :raising_hand: :raising_hand: :raising_hand: :raising_hand: :raising_hand: :raising_hand: :raising_hand: :raising_hand::raising_hand::raising_hand::revolving_hearts::revolving_hearts::revolving_hearts:
Sincerely invite experts to improve the project functions together !
:revolving_hearts::revolving_hearts::revolving_hearts: :raising_hand: :raising_hand: :raising_hand: :raising_hand: :raising_hand: :raising_hand: :raising_hand: :raising_hand: :raising_hand: :raising_hand: :raising_hand: :raising_hand::raising_hand::raising_hand::revolving_hearts: :revolving_hearts::revolving_hearts:
License
Tsai-plat is MIT licensed.