blob: 9003b9038e569c9085ed20a16eb3d5f0e4792d25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
const gulp = require('gulp')
const browserify = require('gulp-browserify')
const babel = require('gulp-babel')
// Basic usage
gulp.task('scripts', function () {
// Single entry point to browserify
return gulp.src('public/javascripts/*.js')
.pipe(babel({
presets: ['es2015']
}))
.pipe(browserify({
insertGlobals: true,
debug: !gulp.env.production
}))
.pipe(gulp.dest('public/javascripts/dest'))
})
gulp.task('scripts:watch', function () {
return gulp.watch('public/javascripts/**/*.js')
})
|