rolling
A preset Rollup workflow.
Last updated 3 years ago by kchan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install rolling 
SYNC missed versions from official npm registry.

rolling NPM version NPM downloads Build Status

Rollup and Webpack are bundlers for different purposes, I mainly use Webpack to bundle web apps, and use Rollup to bundle JavaScript libraries. Using Rollup to bundle libraries ends up with clean, smaller, readable code, so just try it out!

Install

$ npm install -g rolling

Usage

Build:

# it looks for `./src/index.js` by default
# and outputs bundled file to `./dist/bundle.js`
$ rolling src.js --out bundle.js

# Include required modules from node_modules directory
# into the bundled file
$ rolling --include

Watch input:

Currently Rollup does not support incremental builds, so use any watch utility to do this for now, such as onchange:

$ npm install -g onchange
$ onchange ./src -- rolling

Help:

$ rolling --help

Babel:

If you use some ES2015+ features that require babel-runtime, install it in your project:

$ cd my-project
$ npm install babel-runtime --save

API

import {build, watch} from 'rolling'

const options = {
  input: ...,
  output: ...
  // more configs go here
}

build(options).catch(e => console.log(e.stack))
// or
watch(options).catch(e => console.log(e.stack))

License

MIT © EGOIST

Current Tags

  • 0.0.5                                ...           latest (3 years ago)

6 Versions

  • 0.0.5                                ...           3 years ago
  • 0.0.4                                ...           3 years ago
  • 0.0.3                                ...           3 years ago
  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
  • 0.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |