gulp-rollup-lightweight
A thin light-weight gulp plugin that makes working with rollup easy for the latest versions!
Last updated 8 months ago by b1lly .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gulp-rollup-lightweight 
SYNC missed versions from official npm registry.

Travis CI Build Status NPM version NPM downloads Dependency Status Dev Dependency Status

gulp-rollup-lightweight

A Gulp plugin that makes working with Rollup easy!

  • Supports latest version of gulp (CLI 2.0.1 & local 4.0.0)
  • Supports latest version of rollup (CLI v1.4.1)

It's a thin light-weight wrapper around the Rollup JS API that wraps the Rollup Promise in a Readable Stream.

Installation

npm install --save-dev gulp-rollup-lightweight

Basic Usage

const { dest } = require('gulp');
const rollup = require('gulp-rollup-lightweight');
const source = require('vinyl-source-stream');

function bundle() {
  return rollup({
    input: './src/main.js',
    output: {
      format: 'umd'
    }
  })
  .pipe(source('app.js'))
  .pipe(dest('./dist'))
}

Usage for a mixture of ES6 & CJS Modules

const { dest } = require('gulp');
const rollup = require('gulp-rollup-lightweight');
const source = require('vinyl-source-stream');

// Helps to resolve NPM modules
const resolve = require('rollup-plugin-node-resolve');
// Used for CJS resolution
const commonjs = require('rollup-plugin-commonjs')

function bundle() {
  return rollup({
    input: './src/main.js',
    output: {
      format: 'umd'
    },
    plugins: [
      resolve(),
      commonjs()
    ]
  })
  .pipe(source('app.js'))
  .pipe(dest('./dist'))
}

Usage with custom Rollup

const { dest } = require('gulp');
const rollup = require('gulp-rollup-lightweight');
const source = require('vinyl-source-stream');

function bundle() {
  return rollup({
    // Provide your custom Rollup
    rollup: require('rollup'),
    input: './src/main.js',
    output: {
      format: 'umd'
    }
  })
  .pipe(source('app.js'))
  .pipe(dest('./dist'))
}

Current Tags

  • 1.0.10                                ...           latest (8 months ago)

10 Versions

  • 1.0.10                                ...           8 months ago
  • 1.0.9                                ...           8 months ago
  • 1.0.8                                ...           8 months ago
  • 1.0.7                                ...           8 months ago
  • 1.0.6                                ...           8 months ago
  • 1.0.5                                ...           8 months ago
  • 1.0.4                                ...           8 months ago
  • 1.0.3                                ...           8 months ago
  • 1.0.2                                ...           8 months ago
  • 1.0.1                                ...           8 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |