YoungLions QA - Active
Read more
This is a simple updated boilerplate for node packages written in ES6 - based on an article How to build and publish ES6 npm modules today with babel written by Alex Booker (Feb 2, 2016).
Main target of this package: easy to use and no dependencies
The main changes:
- extended the main sample - instead the exported function a class is exported (which consists only of one sample - the same funtions as found in the above article)
- updated babel presets (to babel-preset-env)
- updated devDependencies versions
- added sample tests (using chai + mocha)
- added linting (esLint - google)
- added additional files usually found in packages - .travis.yml, CONTRIBUTING.md, LICENSE
git clone https://github.com/YoungLionsGroup/node-pkg-boilerplate.git YOUR_PACKAGE_NAME
cd node-pkg-boilerplate
npm install
Eventually, you would want to change the package.json, source classes & functions to your own names.
npm run build
- a /dist folder will be creatednpm test
If your finished with creating you package, you can publish it on NPM - Read more.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
On this project, no versioning is being conducted. To learn more about versioning please visit SemVer.
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details
- How to build and publish ES6 npm modules today with babel - Alex Booker (Feb 2, 2016)
- Misunderstanding ES6 Modules, Upgrading Babel, Tears, and a Solution - Kent C. Dodds
- Read more about the babel-preset-env
- Read more about the export default
- Is babel still needed? - stackoverflow question
- ECMAScript compatibility tables