gulp-rollup-mep
Make separate bundles with Rollup according to multiple entry points
Last updated 3 years ago by volkol .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gulp-rollup-mep 
SYNC missed versions from official npm registry.

gulp-rollup-mep

Make separate bundles with Rollup according to multiple entry points.

Current status is in development, therefore something functional of Rollup may not working. If you have any troubles with it - please open issues. Also, I pleasure get help in development this package.

Usage

install gulp-rollup-mep as a development dependency:

npm install gulp-rollup-mep --save-dev

Then, add it to your gulpfile.js:

Simple usage example

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

gulp.task('rollup', function() {
  return gulp.src(['src/index.js', 'src/bundle1.js'])
  .pipe(rollup({
    format: "iife"
  }))
  .pipe(gulp.dest('build'));
});

With Source Maps

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

gulp.task('rollup', function() {
  return gulp.src(['src/index.js', 'src/bundle1.js'])
  .pipe(sourcemaps.init())
  .pipe(rollup({
    format: "iife",
    sourceMap: true
  }))
  .pipe(sourcemaps.write('.'))
  .pipe(gulp.dest('build'));
});

With cache

var rollup = require('gulp-rollup-mep'),
    gulp = require('gulp'),
    cache = {};
    
gulp.task('rollup', function() {
  return gulp.src(['src/index.js', 'src/bundle1.js'])
  .pipe(rollup({
    format: "iife"
  }), cache, function(bundle, filePath) {
    cache[filePath] = bundle;
  })
  .pipe(gulp.dest('build'));
});

Additional options

rollup: accept you desired version of rollup.js

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
Dependencies (3)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |