gulp-rollup-stream

0.2.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i gulp-rollup-stream

Weekly Downloads

131

Version

0.2.0

License

ISC

Last publish

Collaborators

  • renanhangai