Skip to content

Commit 12b9170

Browse files
committed
Add options.rollup to README.md
1 parent 8a1bffe commit 12b9170

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# gulp-rollup [![npm][npm-image]][npm-url] [![Dependency Status][david-image]][david-url] [![Build Status][travis-image]][travis-url]
22

3-
Gulp plugin for [Rollup](https://www.npmjs.com/package/rollup) ES6 module bundler.
3+
Gulp plugin for the [Rollup](https://www.npmjs.com/package/rollup) ES6 module bundler.
44

55
## Install
66

@@ -18,15 +18,25 @@ var gulp = require('gulp'),
1818
gulp.task('bundle', function(){
1919
gulp.src('src/main.js', {read: false})
2020
.pipe(rollup({
21-
// any option supported by rollup can be set here, including sourceMap
21+
// any option supported by Rollup can be set here, including sourceMap
2222
sourceMap: true
2323
}))
2424
.pipe(sourcemaps.write(".")) // this only works if the sourceMap option is true
2525
.pipe(gulp.dest('dist'));
2626
});
2727
```
2828

29-
Refer to [Rollup docs](https://www.npmjs.com/package/rollup) for a list of valid options.
29+
In addition to [the standard Rollup options](https://github.com/rollup/rollup/wiki/JavaScript-API),
30+
gulp-rollup supports `options.rollup`, allowing you to use an older, newer, or
31+
custom version of Rollup by passing in the module like so:
32+
33+
``` js
34+
gulp.src('src/main.js', {read: false})
35+
.pipe(rollup({
36+
rollup: require('rollup')
37+
}))
38+
//...
39+
```
3040

3141
[npm-url]: https://npmjs.org/package/gulp-rollup
3242
[npm-image]: https://img.shields.io/npm/v/gulp-rollup.svg

0 commit comments

Comments
 (0)