/create-nodejs-package

A cli tool that scaffolds and configures everything you need to develop nodeJs packages and publish them to NPM registry :tada:

Primary LanguageJavaScript

Installation

# Install the package globally.
npm i -g @elieandraos/create-nodejs-package
create-nodejs-package

# or (requires NPM6+)
npm init @elieandraos/nodejs-package

The scaffolded package

Includes:

  • ๐Ÿ“ฆ esbuild, an extremely fast JavaScript bundler
  • ๐Ÿงช jest, a delightful JavaScript testing framework
  • ๐Ÿšจ eslint, a tool for identifying and reporting on patterns in JavaScript
  • ๐Ÿ’„ prettier, a tool for code formatting
  • ๐Ÿ”€ dotenv, loads environment variables from a .env file into process.env
  • ๐Ÿš€ automated semantic version releasing

Scripts:

  • npm run build bundles your code with esbuild
  • npm run test runs the test suites with jest
  • npm run format formats the code with prettier
  • npm run lint check for linting error & apply fixes with es-lint
  • npm run release creates a gitHub tag and release, publishes to npm registry
  • npm run info lists the dependencies installed and the ones that are outdated

Customization

The package uses the default eslint:recommended set of rules and few prettier rules. You can customize both of them to your personal flavor.

Release automation

The automated release is shipped from the package @elieandraos/cli-tools

npm run release