clicks-counter/gulpfile.js

29 lines
651 B
JavaScript

const gulp = require('gulp')
const babel = require('gulp-babel')
const clean = require('gulp-clean')
const print = require('gulp-print').default
const nodemon = require('gulp-nodemon')
gulp.task('devel', () => {
nodemon({
script: 'src/app.js',
presets: ['env', 'stage-2'],
exec: 'babel-node'
})
.on('restart', () => { console.log('>> node restart') })
})
gulp.task('clean', () =>
gulp.src('dist/*').pipe(clean())
)
/* WARNING: This is broken right now */
gulp.task('build', () =>
gulp.src('src/**/*.js')
.pipe(babel())
.pipe(print())
.pipe(gulp.dest('dist/'))
)
gulp.task('default', ['clean', 'build'])