aboutsummaryrefslogtreecommitdiff
path: root/gulpfile.js
blob: bb38213f6ee957b3d7d55f684b287661ede12a78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const gulp = require('gulp')
const fs = require('fs')
const browserify = require('browserify')

gulp.task('scripts', function () {
  browserify({ entries: './public/javascripts/main.js', debug: true })
    .transform('babelify', {presets: ['es2015']})
    .bundle()
    .pipe(fs.createWriteStream('./public/javascripts/bundle.js'))
})

gulp.task('scripts:watch', function () {
  return gulp.watch(['./public/javascripts/**/*.js', '!./public/javascripts/bundle.js'], ['scripts'])
})