An ES6 boilerplate for writing NPM package.
MIT License
A template which you could use to write your NPM package via ES6 syntax.
It uses:
Just added 1 more:
git clone https://github.com/Albert-Gao/es6-npm-boilerplate.git
npm install && rm -r .git && git init
npm run check
: Checking the updates of all your dependenciesnpm run lint
: linting via ESLintnpm run clean
: Clean the ./dist
foldernpm run build
: Clean and build src
to dist
npm run test
: Run tests via Jest
npm run test -- --coverage
: Generates test coverage report via Jest
npm run example
: Run example to see if the transpiled code works or not.npm run prepublish
: Clean, lint, test then build,npm run pub
: Interactive way to checking, clean, test, bumping version, tag commits, push repo and publishWe currently have 3 badges here:
Instead of running the default test
command, we will run the npm run prepare
since it including all the phases for the final release.
And in the readme.md, we have a status icon which shows how to add that building status from Travis. Do remember to modify its URL after forking your repo.
It contains an example to show how to debug the Jest
test in Visual studio code, remove it if you don't want.
You should add .vscode
to the .gitignore
file.