0.0.3 • Published 5 years ago
rockabe-randon-number v0.0.3
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
requiremodule.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-envand being configured via.babelrc- I wanted to build it via@babel/preset-envbutbabel.config.jsonwas not doing anything :shrug: