-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
34 lines (32 loc) · 839 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
var gulp = require('gulp');
var rollup = require('rollup-stream');
var babel = require('rollup-plugin-babel');
var npm = require('rollup-plugin-npm');
var commonjs = require('rollup-plugin-commonjs');
var replace = require('rollup-plugin-replace');
var source = require('vinyl-source-stream');
gulp.task('default', function(){
rollup({
entry: './src/ReactSearchDropdown.jsx',
sourceMap: 'inline',
plugins: [
npm({
jsnext: true,
main: true,
}),
commonjs({
sourceMap: true
}),
replace({
'process.env.NODE_ENV': JSON.stringify('development')
}),
babel({
sourceMap: true,
exclude: 'node_modules/**',
presets: ["es2015-rollup", "react"]
})
]
})
.pipe(source('index.js'))
.pipe(gulp.dest('./dist'));
});