0.0.3 • Published 3 years ago

rockabe-randon-number v0.0.3

Weekly downloads
8
License
MIT
Repository
github
Last release
3 years ago

Example project to publish npm module in different styles

write es5, 'build' es5

In v0.0.1 there was no build involved, I simply used node.js's

  • require
  • module.exports

to generate a es5 compatible module, that then could get required in any consuming project.

write es6, build es5

In v0.0.2 I introduced babel to generate a module, that could be written in es6 (using import) and processed to es5.

This module could be imported and required (but using require('moduleName').default) either way in a consuming project.

Open issues

  • babel setup uses the old babel-preset-env and being configured via .babelrc - I wanted to build it via @babel/preset-env but babel.config.json was not doing anything :shrug: