wrollup - Simple watcher for rollup
Simple to use
npm install -g wrollupwrollup -c rollup.config.js
About
A simple watcher for building rollup bundles inspired by the https://github.com/stylus/stylus watcher
Why
The plugin 'rollup-watch' is pretty OK, but has a few issues like not being able to recover, hanging forever when not connected to the internet -- all in all a bit of a pain to deal with. wrollup is intended to make the watching and bundle process as smooth as possible.
How
Using a similar init process we use rollup internally to parse the rollup.config.js file and star the watcher with a set of streamlined logging procedure (similar to stylus-lang) and pretty error parsing.
Arguments
$ wrollup --help Usage: wrollup [options] Examples: wrollup -c rollup.config.js wrollup --verbose --error-glob "scripts/**/*.(ts|tsx|js)" wrollup --help Options: -c, --config Specify path to rollup.config.js --error-glob, --files Specify glob of files to watch on rollup error/crash
Installation
npm install --save-dev wrollup # locally (for use with npm scripts)
or
npm install -g wrollup # globally (not recommended)
Requirements
Rollup
npm install --save-dev rollup # locally (for use with npm scripts)
or
npm install -g rollup # globally (not recommended)
A rollup config file (looks for rollup.config.js by default). A basic one can be for example:
entry: 'src/index.js' // required dest: 'dist/bundle.js' // required format: 'iife' // required plugins: