node-lib-boilerplate

1.0.1 • Public • Published

node-lib-boilerplate

Minimal boilerplate aimed to speed up the process of creating a new NodeJS library.


Travis npm npm

Features

  • Type safety with Flow
  • Transpilation to ES* with Babel Env
  • Continuos CI with Travis
  • Test suites with Jest
  • Test coverage with Codecov
  • Static code analysis with Eslint
  • Standard format style with Editorconfig

Available Scripts

  • clean: Deletes the compiled lib folder;
  • build: Runs the clean script, transpiles the code with babel to the lib folder and copies the flow references;
  • build:watch: Runs the build script in watch mode;
  • lint: Runs eslint;
  • flow: Verifies if there are flow errors;
  • prepublish: Runs all the linting/test suites and creates a brand new build;
  • test: Runs the test suites with jest;
  • test:watch: Runs the tests in watch mode;
  • test:cov: Runs the tests and displays coverage (which should't get below 100%!);
  • test:ci: Tests lint, flow, and jest errors;

You can build your own light version of setting the env.targets property in .babelrc to "node": "current". The version deployed to npm requires at least NodeJS 8.0.0.

License

This project is MIT licensed.

Readme

Keywords

none

Package Sidebar

Install

npm i node-lib-boilerplate

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • jkomyno