0.3.1 • Published 7 years ago

wrollup v0.3.1

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

wrollup - Simple watcher for rollup

npm.io

npm npm npm

Simple to use

npm install -g wrollup
wrollup -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
                                   for auto-recovery (defaults to \'**/*.js*\')
    --verbose                      Wrollup will console.log some extra info of
                                   what is going on
    --disable-cache, --nocache     Disable bundle caching
    --cache-before-disk            Generate cache before bundle written to disk
    -h, --help                     Display help information

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:

import buble from 'rollup-plugin-buble'
import nodeResolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'

export default {
  entry: 'src/index.js',    // required
  dest: 'dist/bundle.js',   // required
  format: 'iife',           // required
  plugins: [
    buble(),
    nodeResolve(),
    commonjs({
      include: 'node_modules/**'
    })
  ]
}
0.3.1

7 years ago

0.2.0

7 years ago

0.1.21

7 years ago

0.1.20

7 years ago

0.1.19

7 years ago

0.1.18

7 years ago

0.1.17

7 years ago

0.1.16

7 years ago

0.1.15

7 years ago

0.1.14

7 years ago

0.1.13

7 years ago

0.1.12

8 years ago

0.1.11

8 years ago

0.1.10

8 years ago

0.1.9

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.18

8 years ago

0.0.17

8 years ago

0.0.15

8 years ago

0.0.14

8 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago

0.0.0

8 years ago