forked from andrewhathaway/Winterfell
-
Notifications
You must be signed in to change notification settings - Fork 6
/
gulpfile.js
34 lines (32 loc) · 861 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 browserify = require('browserify');
var source = require('vinyl-source-stream');
var babelify = require('babelify');
var buffer = require('vinyl-buffer');
var uglify = require('gulp-uglify');
/**
* Examples Build
*/
gulp.task('build-examples', function() {
return browserify({
debug : process.env.NODE_ENV != 'production',
entries : [
'examples/app.js'
]
})
.transform(babelify)
.bundle()
.pipe(source('app.js'))
.pipe(buffer())
.pipe(uglify())
.pipe(gulp.dest('examples/build'));
});
gulp.task('watch-examples', function() {
return gulp.watch([
'src/**/*.js',
'examples/**/*.js',
'!examples/build/app.js'
], {}, function() {
return gulp.start('build-examples');
});
});