rollup-middleware
Simple rollup middleware that rebuilds your bundles.
Last updated 3 years ago by domachine .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install rollup-middleware 
SYNC missed versions from official npm registry.

rollup-middleware

Rollup is a next-generation ES6 module bundler

This is a simple express middleware to rebuild your bundles on request. It's intended for development! Use at least node v6.

Installation

$ npm i -D rollup-middleware

Usage

'use strict'

const app = express()
const opts = {
  rollup: {
    // This object is directly passed to rollup.rollup()
    // See https://github.com/rollup/rollup/wiki/JavaScript-API#rolluprollup-options-

    plugins: [ /* Pass your plugins */ ],
  },

  generate: {
    // This object is directly passed to rollup.generate()
    // See https://github.com/rollup/rollup/wiki/JavaScript-API#bundlegenerate-options-

    format: 'cjs'
  },

  // This is used as a prefix to look for entry files
  prefix: 'src',

  // Regex to serve only specific files
  grep: /\.js$/
}
app.use('/js', rollup(opts))

Current Tags

  • 0.1.1                                ...           latest (3 years ago)

3 Versions

  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
  • 0.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 16
Last Day 3
Last Week 3
Last Month 1
Dependencies (1)
Dev Dependencies (8)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |