Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flexdinesh/npm-module-boilerplate
Boilerplate for npm modules with ES6 features and all the best practices
https://github.com/flexdinesh/npm-module-boilerplate
boilerplate es6 npm-package npm-publish
Last synced: 5 days ago
JSON representation
Boilerplate for npm modules with ES6 features and all the best practices
- Host: GitHub
- URL: https://github.com/flexdinesh/npm-module-boilerplate
- Owner: flexdinesh
- License: mit
- Created: 2018-01-21T05:28:33.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-01-09T23:00:16.000Z (about 3 years ago)
- Last Synced: 2025-02-07T05:34:29.792Z (14 days ago)
- Topics: boilerplate, es6, npm-package, npm-publish
- Language: JavaScript
- Homepage:
- Size: 13.7 KB
- Stars: 390
- Watchers: 6
- Forks: 100
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NPM Module Boilerplate
[](https://travis-ci.org/flexdinesh/npm-module-boilerplate) [](https://david-dm.org/flexdinesh/npm-module-boilerplate) [](https://david-dm.org/flexdinesh/npm-module-boilerplate?type=dev) [](https://opensource.org/licenses/MIT)
## NOTE: This setup is pretty old and outdated for 2022. I need to update it to use [Microbundle](https://github.com/developit/microbundle). In the meanwhile, do yourself a favour and setup your lib with Microbundle directly (it's pretty simple and straightforward) instead of using the boilerplate code.
**Start developing your NPM module in seconds** ✨
Readymade boilerplate setup with all the best practices to kick start your npm/node module development.
Happy hacking =)
# Features
* **ES6/ESNext** - Write _ES6_ code and _Babel_ will transpile it to ES5 for backwards compatibility
* **Test** - _Mocha_ with _Istanbul_ coverage
* **Lint** - Preconfigured _ESlint_ with _Airbnb_ config
* **CI** - _TravisCI_ configuration setup
* **Minify** - Built code will be minified for performance# Commands
- `npm run clean` - Remove `lib/` directory
- `npm test` - Run tests with linting and coverage results.
- `npm test:only` - Run tests without linting or coverage.
- `npm test:watch` - You can even re-run tests on file changes!
- `npm test:prod` - Run tests with minified code.
- `npm run test:examples` - Test written examples on pure JS for better understanding module usage.
- `npm run lint` - Run ESlint with airbnb-config
- `npm run cover` - Get coverage report for your code.
- `npm run build` - Babel will transpile ES6 => ES5 and minify the code.
- `npm run prepublish` - Hook for npm. Do all the checks before publishing your module.# Installation
Just clone this repo and remove `.git` folder.# License
MIT © Dinesh Pandiyan