Modern Node Package
Modern Stack to build server-side Node.js packages
What's included?
Testing
Requirements:
- Parallel tests
- Isolated tests
- Async / Await support
- Assertion counting
- Good diff reporting
- TAP reporter
- Coverage reports
🌟 ava
Linting & Formatting
Requirements:
- StandardJs
- Opinionated Code Formatter
- Format files on precommit
🌟 prettier
npm run format
npm run lint
Format staged files only
Runs on precommit hooks by hasky package.
Code coverage
Requirements: Support for common report formats
🌟 Istanbul nyc
npm run coverage
npm run coverage:html
🌟 Send coverage report with coveralls to coveralls.io
Publishing
Requirements: Painless NPM publishing
🌟 np
np patch
np minor
np major
Git-Hooks
Requirements: Define hooks as npm scripts
🌟 Husky
Continuous Integration
Requirements: Free CI for OS
Maintaining consistent coding styles
Ignore files
- Use a .npmignore file to keep stuff out of your package.
- Use .gitignore file to keep stuff out of your repository.