mili
Scaffolding with continuous control over the development of the project.
Last updated a month ago by val.istar.guo .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install mili 
SYNC missed versions from official npm registry.

logo

Mili

version downloads license dependencies coveralls

简体中文

Projects that derived from the same scaffolding, have evolved over time and become different. Scaffolding lost control of the subsequent development of the project. When we need to improve some of the basic functions of scaffolding(e.g. eslint rules), we need to modify each project, and even have to design a customized solution for some old projects.

Therefore, in order to improve the control ability of scaffolding for the subsequent development of the project,template can modified some files and release new template version, then project can upgrade the template version.

It is useful for team project management.

Usage

The basic principle of mili.

  1. First, you need to design your own template or use someone else's template.
  2. Make project directory and run npx mili init template_path.
  3. Run npx mili upgrade, when template is out of date.
  4. mili run the handler of file that set by tempalte, when init or upgrade template

Init Project

Let's use a existed template.

mkdir project_path
cd project_path

# template in github
npx mili init github:Val-istar-Guo/mili-template
# template in npm
npx mili init npm:mili-template
# template in private git repository
npx mili init https://github.com/Val-istar-Guo/mili.git

Upgrade

The upgrade operation is very simple to use.The effect of the upgrade is determined by the handlers configured for each file in the template configuration.

npx run upgrade

The handler can extract the data of the project file, or use the template file as a mustache template to render a new project file that will cover old one.

The handlers can be flexibly and freely combined to implement a variety of initialization and upgrade modes.

Check Before Commit

With husky, it is easy to verify whether the project file meets the template before commit. Thereby ensuring the specification of the project code.

Run in terminal:

npx mili check --diff --fold

Or configuration in husky:

hooks:
  pre-commit: 'npx mili check --diff --fold'

An example:

mili check

Run npx mili upgrade command will auto modify code according to the diff.

See More

Sponsor

Support code development on patron.

patron

Contributing & Development

If there is any doubt, it is very welcome to discuss the issue together. Please read Contributor Covenant Code of Conduct and CONTRIBUTING.

Current Tags

  • 0.0.2                                ...           canary (a year ago)
  • 3.7.0                                ...           latest (a month ago)

67 Versions

  • 3.7.0                                ...           a month ago
  • 3.6.0                                ...           a month ago
  • 3.5.0                                ...           a month ago
  • 3.4.0                                ...           2 months ago
  • 3.2.0                                ...           2 months ago
  • 3.1.0                                ...           2 months ago
  • 3.0.0                                ...           2 months ago
  • 2.9.0                                ...           2 months ago
  • 2.8.0                                ...           2 months ago
  • 2.7.3                                ...           2 months ago
  • 2.7.2                                ...           3 months ago
  • 2.7.1                                ...           3 months ago
  • 2.7.0                                ...           3 months ago
  • 2.6.1                                ...           3 months ago
  • 2.6.0                                ...           3 months ago
  • 2.5.0                                ...           4 months ago
  • 2.4.0                                ...           4 months ago
  • 2.3.0                                ...           4 months ago
  • 2.2.0                                ...           4 months ago
  • 2.1.1                                ...           6 months ago
  • 2.1.0                                ...           6 months ago
  • 2.0.0                                ...           6 months ago
  • 1.10.0                                ...           8 months ago
  • 1.9.0                                ...           9 months ago
  • 1.8.0                                ...           9 months ago
  • 1.7.0                                ...           9 months ago
  • 1.6.0                                ...           9 months ago
  • 1.5.0                                ...           10 months ago
  • 1.4.0                                ...           10 months ago
  • 1.3.3                                ...           10 months ago
  • 1.3.2                                ...           10 months ago
  • 1.3.1                                ...           10 months ago
  • 1.3.0                                ...           10 months ago
  • 1.2.1                                ...           10 months ago
  • 1.2.0                                ...           10 months ago
  • 1.1.4                                ...           10 months ago
  • 1.1.3                                ...           10 months ago
  • 1.1.2                                ...           10 months ago
  • 1.1.1                                ...           10 months ago
  • 1.1.0                                ...           10 months ago
  • 1.0.1                                ...           10 months ago
  • 1.0.0                                ...           10 months ago
  • 0.1.0                                ...           a year ago
  • 0.0.9                                ...           a year ago
  • 0.0.8                                ...           a year ago
  • 0.0.7                                ...           a year ago
  • 0.0.6                                ...           a year ago
  • 0.0.5                                ...           a year ago
  • 0.0.4                                ...           a year ago
  • 0.0.3                                ...           a year ago
  • 0.0.2                                ...           a year ago
  • 0.0.2-alpha.5                                ...           a year ago
  • 0.0.2-alpha.4                                ...           a year ago
  • 0.0.2-alpha.3                                ...           a year ago
  • 0.0.2-alpha.2                                ...           a year ago
  • 0.0.2-alpha.1                                ...           a year ago
  • 0.0.1                                ...           a year ago
  • 0.0.1-alpha.10                                ...           a year ago
  • 0.0.1-alpha.9                                ...           a year ago
  • 0.0.1-alpha.8                                ...           a year ago
  • 0.0.1-alpha.7                                ...           a year ago
  • 0.0.1-alpha.6                                ...           a year ago
  • 0.0.1-alpha.5                                ...           a year ago
  • 0.0.1-alpha.4                                ...           a year ago
  • 0.0.1-alpha.3                                ...           a year ago
  • 0.0.1-alpha.2                                ...           a year ago
  • 0.0.1-alpha.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 69
Last Day 0
Last Week 2
Last Month 133
Dependencies (27)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |