Skip to content

An npm package template for Mastashake npm packages.

License

Notifications You must be signed in to change notification settings

mastashake08/npm-package-template

 
 

Repository files navigation

npm-package-template

NPM

NPM version Build Status Coverage Status

npm package template.

Installation

Clone repository with Git:

git clone https://github.com/mastashake08/npm-package-template.git
cd npm-package-template

Usage

Rename package (use npm-package-name-checker to check for name availability):

# replace $NAME with your package name
git grep -l npm-package-template | xargs sed -i '' -e "s/npm-package-template/$NAME/g"

Manually update the files:

  • LICENSE
  • README.md
  • package.json

Reinitialize Git repository:

rm -rf .git
git init

Install package dependencies:

npm install

Make first commit:

git commit -am "feat: initial commit"

Testing

Run tests:

npm test

Run tests in watch mode:

npm run test:watch

Run tests with coverage:

npm run test:coverage

View coverage in browser:

npm run test:coverage:report
open coverage/index.html

Lint files:

npm run lint

Fix lint errors:

npm run lint:fix

Release

Only collaborators with credentials can release and publish:

npm run release
git push --follow-tags && npm publish

To see what files are going to be published, run the command:

npm pack --dry-run
# tar tvf $(npm pack)

Support

License

MIT

About

An npm package template for Mastashake npm packages.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%