gulp-rollup-stream
Gulp rollup stream
Last updated 2 years ago by renanhangai .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gulp-rollup-stream 
SYNC missed versions from official npm registry.

gulp-rollup-stream

Usage

Basic usage###

	const gulp   = require( 'gulp' );
	const rollup = require( 'gulp-rollup-stream' );
	
	gulp.task( 'rollup', function() {
		return gulp.src( 'src/main.js' )
			.pipe(rollup({
				format: 'cjs'
			})
			.pipe( gulp.dest( 'build' ) )
		;	
	});

Documentation

rollup( options[, bundleCb] )

Create a rollup-stream. Check Rollup documenation for more options

  • bundleCb: Everytime a new bundle this callback is called using: bundleCb( bundle ) Useful for cache:
var cache;
function bundleCb( bundle ) { cache = bundle; }
  • options.root: The path where to look at modules at first when using import mod from 'my/module'. It will look into path.resolve( options.root, 'my/module' );

Rollup options supported

Current Tags

  • 0.2.0                                ...           latest (2 years ago)

7 Versions

  • 0.2.0                                ...           2 years ago
  • 0.1.3                                ...           3 years ago
  • 0.1.2                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
  • 0.0.6                                ...           3 years ago
  • 0.0.5                                ...           3 years ago
  • 0.0.4                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 3
Dependencies (5)
Dev Dependencies (3)

Copyright 2014 - 2017 © taobao.org |