A fast text/code generator
npm install @tonyer/cga text tool that saves you time and helps your team build new files with consistency.
1. Download from release
2. Install by npm
``shell`
npm i -g @tonyer/cg
`shell`other package manager
yarn add -g @tonyer/cg
pnpm add -g @tonyer/cg
- Add template
`shell`
cd examplesadd a template to user path
cg add baseas new name
cg add base test
- Use Template name
`shell`use template to generate
cg g base --name Tom --age 12
cg g test --name Job --age 44
- Use Template path
`shell`use template to generate
cg g --template=examples/base --params="name=Tom&age=12"
cg g --template=examples/test --params="name=Tom&age=12"
- Add template repo
`shell`clone template repo
cg clone https://github.com/MQpeng/cg-templates
- fetch template repo
`shell``pull template repo
cg pull