clicks-counter/gulpfile.js

24 lines
680 B
JavaScript
Raw Normal View History

2018-10-16 20:04:08 +00:00
const gulp = require('gulp')
const gulpBabel = require('gulp-babel')
const gulpClean = require('gulp-clean')
const gulpPrint = require('gulp-print').default
2018-10-16 21:19:54 +00:00
const nodemon = require('gulp-nodemon')
2018-10-16 20:51:10 +00:00
const devel = (done) =>
nodemon({ script: 'src/server.js', exec: 'babel-node', done })
2018-10-16 20:51:10 +00:00
.on('restart', () => { console.log('>> node restart') })
2018-10-16 20:04:08 +00:00
const clean = () => gulp.src('dist/*').pipe(gulpClean())
2018-10-16 20:04:08 +00:00
2018-10-17 13:44:22 +00:00
/* WARNING: This is broken right now */
const build = () =>
2018-10-16 20:04:08 +00:00
gulp.src('src/**/*.js')
.pipe(gulpBabel())
.pipe(gulpPrint())
2018-10-16 20:04:08 +00:00
.pipe(gulp.dest('dist/'))
exports.devel = devel
exports.clean = clean
exports.build = build
exports.default = gulp.series(clean, build)