npm-boilerplate-node

Boilerplate for creating an NPM module for Node environment.

Usage no npm install needed!

<script type="module">
  import npmBoilerplateNode from 'https://cdn.skypack.dev/npm-boilerplate-node';
</script>

README

NPM Boilerplate Node

Build Status Test Covarage Greenkeeper Latest Version

Boilerplate for creating an NPM module for Node environment.

Installation

$ npm install npm-boilerplate-node

Usage

const foo = require("npm-boilerplate-node");

(async () => {
  const result = foo("bar");

  console.log(result);
})();

API

foo(bar, [baz])

Parameters

  • bar (String): Requires string.
  • baz (optional Object): Optional object, default to {}.

Returns

It returns a Promise which when resolved contains something.

Related

License

MIT © Risan Bagja Pradana

Using the Boilerplate

Download the boilerpate:

wget https://github.com/risan/npm-boilerplate-node/archive/master.zip \
    -O master.zip && \
    unzip master.zip && \
    mv npm-boilerplate-node-master my-package && \
    rm master.zip

Toolings:

Available scripts:

  • npm run lint: Run the linter.
  • npm run lint-fix: Apply the linter fixes.
  • npm run test: Run the tests.

Third-party services: