A CLI tool for my personal productivity.


Keywords
zce-cli, cli, zce, productivity, generator
License
MIT
Install
npm install zce-cli@0.2.5

Documentation

zce-cli

A CLI tool for my personal productivity, inspired by vue-cli & yeoman & etc.

Build Status Coverage Status NPM Downloads NPM Version
License Code Style Dependencies Status DevDependencies Status


Installation

# install it globally
$ yarn global add zce-cli

# or npm
$ npm install -g zce-cli

Usage

Generator

Simple scaffolding for generate project. How to work.

init

# generate a new project from a template
$ zce init <template-name> [my-project] [-o|--offline] [-f|--force] [-s|--save]
Options
  • -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
Example
Use github repo template
$ 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.

Use local template

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

# list available official templates
$ zce list [-s|--short]
Options
  • -s, --short: short list display
  • -h, --help: output usage information

Official Templates

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.

Create Your Template

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.

Server (WIP)

Simple static site develop workflow.

🚧

Maybe more...

API Usage

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 })

// ...

TODOS

Generator

  • list command
  • init command
  • unit test
  • e2e test
  • Official Templates
  • Lodash template debug

Server

  • Planning

Contributing

  1. Fork it on GitHub!
  2. Clone the fork to your own machine.
  3. Checkout your feature branch: git checkout -b my-awesome-feature
  4. Commit your changes to your own branch: git commit -am 'Add some feature'
  5. Push your work back up to your fork: git push -u origin my-awesome-feature
  6. 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!

License

MIT Β© ζ±ͺ磊