2018-12-12 15:21:48 +00:00
|
|
|
const gulp = require('gulp')
|
|
|
|
const clean = require('gulp-clean')
|
2018-12-20 23:49:17 +00:00
|
|
|
const mocha = require('gulp-mocha')
|
2018-12-12 15:21:48 +00:00
|
|
|
const print = require('gulp-print').default
|
2018-12-22 10:25:43 +00:00
|
|
|
const run = require('gulp-run-command').default
|
2018-12-12 15:21:48 +00:00
|
|
|
const nodemon = require('gulp-nodemon')
|
|
|
|
|
|
|
|
gulp.task('devel', () => {
|
|
|
|
nodemon({
|
|
|
|
script: 'src/server.js',
|
|
|
|
presets: ['env', 'stage-2'],
|
|
|
|
})
|
|
|
|
.on('restart', () => { console.log('>> node restart') })
|
|
|
|
})
|
|
|
|
|
2018-12-20 23:49:17 +00:00
|
|
|
gulp.task('test', () =>
|
|
|
|
gulp.src('test/**/*.js', {read: false})
|
2019-01-15 19:09:26 +00:00
|
|
|
.pipe(mocha({sort: true, reporter: 'list'}))
|
2018-12-22 09:52:31 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
gulp.task('testw', () =>
|
|
|
|
gulp.src('test/**/*.js', {read: false})
|
2019-01-15 19:09:26 +00:00
|
|
|
.pipe(mocha({sort: true, reporter: 'list', watch: true}))
|
2018-12-20 23:49:17 +00:00
|
|
|
)
|
|
|
|
|
2018-12-28 00:41:59 +00:00
|
|
|
gulp.task('build', ['test'])
|
2018-12-12 15:21:48 +00:00
|
|
|
|
2018-12-22 10:25:43 +00:00
|
|
|
gulp.task('image', ['build'], run('docker build -t statusteam/ghcmgr .'))
|
|
|
|
|
|
|
|
gulp.task('push', ['image'], run('docker push statusteam/ghcmgr'))
|
|
|
|
|
|
|
|
gulp.task('default', ['build'])
|
|
|
|
gulp.task('release', ['push'])
|