blob: 2ab83750a8330606efd9f60446035474094c54de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
var gulp = require('gulp');
var browserify = require('browserify');
var babelify = require('babelify');
var source = require('vinyl-source-stream');
gulp.task('build', function () {
return browserify({entries: './app.js', debug: true})
.transform(babelify)
.bundle()
.on('error', function (err) {
console.error(err);
this.emit('end');
})
.pipe(source('bundle.js'))
.pipe(gulp.dest('dist'));
});
gulp.task('watch', ['build'], function () {
gulp.watch('*.js', ['build']);
});
gulp.task('default', ['watch']);
|