A CLI tool for my personal productivity, inspired by vue-cli & yeoman & etc.
# install it globally
$ yarn global add zce-cli
# or npm
$ npm install -g zce-cli
Simple scaffolding for generate project. How to work.
# generate a new project from a template
$ zce init <template-name> [my-project] [-o|--offline] [-f|--force] [-s|--save]
-f, --force
: overwrite target directory if it exists-o, --offline
: offline mode, use cached template-s, --save
: save the answers for the next-h, --help
: output usage information
$ zce init nm my-module
The above command pulls the template from zce-templates/nm, then ask some questions, and generate the project at ./my-module
.
Instead of a GitHub repo, you can also use a template on your local file system, e.g.
$ zce init ~/local/foo my-foo
The above command use the template from ~/local/foo
, then ask some questions, and generates the project at ./my-foo
.
# list available official templates
$ zce list [-s|--short]
-s, --short
: short list display-h, --help
: output usage information
Current available templates list:
- template - Templates template
- nm - Node module boilerplate
- webapp - 🚧 Modern web app
- react - 🚧 Modern web app by React.js
- vue - 🚧 Modern web app by Vue.js
- jekyll - 🚧 Static site by Jekyll
- electron - 🚧 Electron app
- x-pages - 🚧 Static site by x-pages
Maybe more: https://github.com/zce-templates
You can also run
zce ls
to see all available official templates in real time.
To create and distribute your own template, refer to Create new template.
Maybe fork an official template or use zce-templates/template is a better decision.
Simple static site develop workflow.
🚧
You can use it in your CLI program.
const { generator, server } = require('zce-cli')
// ...
// generate a new project from a template
await generator.init(template, project, { force, offline, save })
// ...
// list available official templates
generator.list(username, { short })
// ...
- list command
- init command
- unit test
- e2e test
- Official Templates
- Lodash template debug
- Planning
- Fork it on GitHub!
- Clone the fork to your own machine.
- Checkout your feature branch:
git checkout -b my-awesome-feature
- Commit your changes to your own branch:
git commit -am 'Add some feature'
- Push your work back up to your fork:
git push -u origin my-awesome-feature
- Submit a Pull Request so that we can review your changes.
NOTE: Be sure to merge the latest from "upstream" before making a pull request!