Browse Source

Add 10-using-rollup-with-gulp.md with example code for integrating with gulp.

master
Matt Mazzola 8 years ago
committed by RyanZim
parent
commit
0662cb08f4
  1. 31
      src/guide/10-using-rollup-with-gulp.md

31
src/guide/10-using-rollup-with-gulp.md

@ -0,0 +1,31 @@
---
title: Using RollupJS with Gulp
---
Rollup returns promises which are understood by gulp so integration is easy.
The syntax is very similar to the configuration file, but the properties are split across two different operations. Constructing the bundle, and transpiling to a target output.
```js
var gulp = require('gulp')
rollup = require('rollup')
rollupTypescript = require('rollup-plugin-typescript')
;
gulp.task('build', function () {
return rollup.rollup({
entry: "./src/main.ts",
plugins: [
rollupTypescript()
],
})
.then(function (bundle) {
bundle.write({
format: "umd",
moduleName: "library",
dest: "./dist/library.js",
sourceMap: true
});
})
});
```
Loading…
Cancel
Save