Skip to content
forked from dwqs/chare

A simple CLI scaffolding for front-end projects

License

Notifications You must be signed in to change notification settings

zeroone001/chare

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chare

A simple CLI scaffolding for front-end projects.

Installation

Prerequisites: Node.js (>=6.x) and Git.

$ npm install chare -g

Usage

$ chare init <template-name> <project-name>

Example:

$ chare init vue-webpack my-project

The above command pulls the template from waka-templates/vue-webpack, prompts for some information, and generates the project at ./my-project/

Command

  • chare or chare -h --- find help info for chare.
  • chare list --- list all available official templates from waka-templates.
  • chare init template-name your-project-name --- init your project with specified template.
  • chare token -u your-github-user-name -p your-personal-token --- set auth token to get a higher rate limit of api requests. Check out the documentation for more details.

Note: Check out the documentation for more details about Basic Authentication.

Templates

Waka provides some simple official template, if it can't meet your needs, you also can specified template from others' repo or use your local template.

Official Templates

All official project templates are repos in the waka-templates organization. When a new template is added to the organization, you will be able to run chare init <template-name> <project-name> to use that template. You can also run chare list to see all available official templates.

Templates will be provided include:

  • vue-webpack --- A simple template webpack + vuejs setup for projects
  • zepto-webpack --- A simple template webpack + zepto setup for projects
  • react-webpack --- A simple template webpack + react setup for projects

Additional, you also can check template simple to write owner customized template.

Templates from github

It's unlikely to make everyone happy with the official templates. You can simply fork an official template and then use it via chare-cli with:

chare init username/repo my-project

Where username/repo is the GitHub repo shorthand for your fork.

Local Templates

Instead of a GitHub repo, you can also use a template on your local file system:

chare init ~/fs/path/to-custom-template my-project

There is a guide for to writing owner customized template.

Note

In the guide, we said that the template has its directory structure like it must have a template directory that holds the template files.

But the template you used doesn't meet the rules, chare will use the root directory of repo or local template.

Example:

chare init repo/test test

If template directory(which path is like test/template) doesn't exist in the root directory of test, chare will use test as the template to init your project.

Thanks

To metalsmith scaffolder for the head start.

About

A simple CLI scaffolding for front-end projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%