Minimal JavaScript library boilerplate for your next project.

Usage no npm install needed!

<script type="module">
  import pratikGaloriaMinimalJsLibrary from 'https://cdn.skypack.dev/@pratik.galoria/minimal-js-library';



Minimal JavaScript library boilerplate for your next project.

Kick start your own JavaScript library and publish as a npm package.

Travis (.org) npm (scoped) GitHub issues npm bundle size


  • ES6 - Babel will transpile the code
  • Test - Jest with coverage
  • Lint - Eslint with recommended config
  • CI - Travis-ci minimal config
  • Minify - Builds the minified code

Quick Start

  1. Clone the repository:
git clone https://github.com/pratikgaloria/minimal-js-library.git
  1. Edit the source inside src folder.
  2. Build the project and test.
npm run build
npm test


npm login
#Logged in as pratik.galoria to scope @pratik.galoria on https://registry.npmjs.org/.

npm publish
# + @pratik.galoria/minimal-js-library@1.0.0

Step by step guide to publish the package: https://www.freecodecamp.org/news/how-to-make-a-beautiful-tiny-npm-package-and-publish-it-2881d4307f78/


Once published as a npm package, you can install the library on any of your project using npm:

npm install --save @pratik.galoria/minimal-js-library

And then, use like this:

import sum from '@pratik.galoria/minimal-js-library';

console.log(sum(1, 2)); // 3


  • npm run build - Babel will transpile ES6 to ES5 and minify the code.
  • npm run lint - Run Eslint with recommended config
  • npm test - Run Jest with coverage results


MIT © Pratik Galoria