Git Product home page Git Product logo

zce-cli's Introduction

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 ยฉ ๆฑช็ฃŠ

zce-cli's People

Contributors

renovate-bot avatar renovate[bot] avatar zce avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.