es6-module-boilerplate

boilerplate for es6 -> es5 module

Usage no npm install needed!

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

README

es6-module-boilerplate

use this as a starting point for creating es6 modules that have a build script to make an es5 version that gets used by default.

Notice package.json has these lines

"main": "src/es5/index.js",
"main-es6": "src/es6/index.js",

keep this format, including the dir structure so that it's easy to use with something like require-es6

The workflow would look something like this

git clone https://github.com/kolodny/es6-module-boilerplate
rm -rf .git
git init
npm install
npm init

Ideas and pull requests welcomed