JSPM

  • Created
  • Published
  • Downloads 3798
  • Score
    100M100P100Q114595F
  • License MIT

gulp plugin for Rollup ES6 module bundler

Package Exports

  • gulp-rollup

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gulp-rollup) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

gulp-rollup npm Dependency Status Build Status

Gulp plugin for the Rollup ES6 module bundler.

Install

npm i --save-dev gulp-rollup

Usage

var gulp       = require('gulp'),
    rollup     = require('gulp-rollup'),
    sourcemaps = require('gulp-sourcemaps');

gulp.task('bundle', function(){
  gulp.src('src/main.js', {read: false})
    .pipe(rollup({
        // any option supported by Rollup can be set here, including sourceMap
        sourceMap: true
    }))
    .pipe(sourcemaps.write(".")) // this only works if the sourceMap option is true
    .pipe(gulp.dest('dist'));
});

In addition to the standard Rollup options, gulp-rollup supports options.rollup, allowing you to use an older, newer, or custom version of Rollup by passing in the module like so:

gulp.src('src/main.js', {read: false})
  .pipe(rollup({
      rollup: require('rollup')
  }))
  //...