Skip to content
A simple CLI for scaffolding some projects.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib
.editorconfig
.eslintrc
.gitignore
README.md
package-lock.json
package.json

README.md

mhg-cli

A simple CLI for scaffolding some projects.

Installation

$ npm install -g mhg-cli

Usage

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

Example:

$ hg init pages my-project

The above command pulls the template from mhg-templates.

Current available templates

  • simple - A template of ES6 dedevelopment with webpack + babel-loader.

  • pages - A template of dedevelopment in multiple pages with webpack + babel-loader + eslint + sass.

  • package - A template of dedevelopment in javascript package with webpack + babel-loader + eslint.

  • vue - A template of vue with webpack + vue + vuex + hot reload + linting + testing + css extraction.

  • ele-admin - A template of content management system with vue + element-ui.

  • react - A template of react with webpack + react + react-router4 + redux + less.

Custom Templates

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

hg init username/repo my-project

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

The shorthand repo notation is passed to download-git-repo so you can also use things like bitbucket:username/repo for a Bitbucket repo and username/repo#branch for tags or branches.

Change Log

2019.10.9

v1.1.2 use Buffer.from() instead new Buffer()

2019.4.18

v1.1.1 support offline

v1.1.0 show list via request

2018.5.22

v1.0.1 init project

You can’t perform that action at this time.