@comandeer/rollup-lib-bundler

Simple library bundler

Usage no npm install needed!

<script type="module">
  import comandeerRollupLibBundler from 'https://cdn.skypack.dev/@comandeer/rollup-lib-bundler';
</script>

README

@comandeer/rollup-lib-bundler

Build Status Dependency Status devDependencies Status codecov npm (scoped)

Super opinionated library bundler using Rollup, Babel and terser.

How does it work?

It gets package.json from the current working directory, parses it and get neeeded info:

  • name, author, version and license to create beautiful banner comment,
  • exports.require or main to get path for saving CJS bundle,
  • exports.import, module or jsnext:main for saving ESM bundle.

Of course it treats src/index.js as the only entry point for Rollup.

Installation

npm install @comandeer/rollup-lib-bundler --save-dev

Usage

Just make it a npm script:

"scripts": {
    "build": "rlb"
}

Configuration

No configuration. Consider it a feature.

License

See LICENSE file for details.