0.3.1 • Published 9 years ago

wrollup v0.3.1

Weekly downloads
5
License
MIT
Repository
github
Last release
9 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

9 years ago

0.2.0

9 years ago

0.1.21

9 years ago

0.1.20

9 years ago

0.1.19

9 years ago

0.1.18

9 years ago

0.1.17

9 years ago

0.1.16

9 years ago

0.1.15

9 years ago

0.1.14

9 years ago

0.1.13

9 years ago

0.1.12

9 years ago

0.1.11

9 years ago

0.1.10

9 years ago

0.1.9

9 years ago

0.1.8

9 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.18

9 years ago

0.0.17

10 years ago

0.0.15

10 years ago

0.0.14

10 years ago

0.0.13

10 years ago

0.0.12

10 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago