GithubHelp home page GithubHelp logo

create-nm's Introduction

create-nm

NPM version Build status Coverage status Dependency status CircleCI

npm init nm to create a npm module.

Never manually do the linting, versioning, tagging, editing changelog and pushing commit, unleash the power of hooks.

Create a npm module

  • use npm
# choose one of the following methods
$ npm init nm [name]
$ npx create-nm [name]
$ npm i -g create-nm && create-nm [name]
  • use yarn
$ yarn create nm [name]

Workflow of publishing a npm module

Commit and publish, everything will be done automatically.

$ git commit
$ npm publish
                       +-------------------+
version :  1.1.0       |                   |
    tag : v1.1.0       |   $ git commit    |
                       |                   |
                       +--+----------------+
                          |
                          +-> lint-staged

                       +-------------------+
                       |                   |
                       |   $ git commit    |
                       |                   |
                       +--+----------------+
                          |
                          +-> lint-staged

                                 +
                                 |
                                 |
                                 |
                                 v

                       +-------------------+
                       |                   |
version :  1.1.1       |  $ npm publish    |
    tag : v1.1.1       |                   |
                       +--+----------------+
                          |
                          |   update npm version
                          |   update CHANGELOG.md
                          |   commit version with changelog
                          +-> add git tag
                              git push commit
                              npm publish

Optional workflow

Use git cz instead of git commit, this will generate better changelog. You need to install commitizen and create ~/.czrc.

$ npm install commitizen -g
$ echo '{ "path": "cz-conventional-changelog" }' > ~/.czrc

Workflow:

$ git cz
$ npm publish

Related

  • np A better npm publish.
  • commitizen Simple commit conventions for internet citizens.
  • conventional-changelog Generate a changelog from git metadata.
  • lint-staged Lint files staged by git.
  • husky Prevents bad commit or push (git hooks, pre-commit/precommit, pre-push/prepush, post-merge/postmerge and all that stuff...)].

Contributors

License

MIT

create-nm's People

Contributors

zhangyuheng avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.