Skip to content

risan/npm-boilerplate-node-browser

Repository files navigation

NPM Boilerplate Node Browser

Build Status Test Covarage Latest Version

Boilerplate for creating an NPM module for Node and browser environments.

Installation

$ npm install npm-boilerplate-node-browser

CDN

The library is available over a CDN:

<script src="https://unpkg.com/npm-boilerplate-node-browser@latest/dist/npm-boilerplate-node-browser.umd.js"></script>

<!-- Or the minified version -->
<script src="https://unpkg.com/npm-boilerplate-node-browser@latest/dist/npm-boilerplate-node-browser.umd.min.js"></script>

Usage

import foo from "npm-boilerplate-node-browser";

(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-browser/archive/master.zip \
    -O master.zip && \
    unzip master.zip && \
    mv npm-boilerplate-node-browser-master my-package && \
    rm master.zip

Toolings:

Available scripts:

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

Third-party services:

About

Boilerplate for creating an NPM module for Node and browser environments.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published