Skip to content

ryanmorr/js-browser-boilerplate

Repository files navigation

js-browser-boilerplate

Minimal boilerplate for browser-based JavaScript projects.

Features

  • Bundle modules with Rollup and generate a build for each of CJS, ESM, and UMD
  • Code linting courtesy of ESLint
  • Unit testing with Mocha, Chai, and Sinon using the Karma test runner inside Headless Chrome
  • Code minification via terser
  • Includes support for continuous integration testing via GitHub Actions
  • Automatically includes a (configurable) banner to the distributed builds

Setup

  1. Run npm install to install the developmental dependencies
  2. Open package.json and change the relevant fields: name, description, homepage, etc.
  3. Open rollup.config.js and make the necessary changes to reflect your preferences

Commands

  • npm test - Run unit tests
  • npm run lint - Lint source files and test specs
  • npm run build - Bundle, transpile, and minify the source into the distributed builds

License

This project is dedicated to the public domain as described by the Unlicense.

About

Minimal boilerplate for browser-based JavaScript projects

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published