-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
35 lines (29 loc) · 890 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
35
'use strict';
require('babel-runtime/regenerator');
require("babel-polyfill");
require('babel-core/register');
var gulp = require('gulp')
, babel = require('gulp-babel')
, concat = require("gulp-concat")
, sourcemaps = require('gulp-sourcemaps')
, mergeStream = require('merge-stream')
, strip = require('gulp-strip-comments')
, del = require('del');
gulp.task('build:js', function() {
var polyfill = 'node_modules/regenerator-runtime/runtime.js';
return mergeStream(
gulp.src(polyfill),
gulp.src('src/**/*.js')
.pipe(sourcemaps.init())
.pipe(babel())
)
.pipe(strip())
.pipe(concat("sphinx-promise.js"))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('dist/js'));
});
gulp.task('clean', function (cb) {
del(['dist'], cb);
});
gulp.task('build', ['build:js']);
gulp.task('default', ['build']);