2019-06-19 05:43:07 +00:00
|
|
|
const gulp = require('gulp');
|
|
|
|
const run = require('gulp-run-command').default;
|
2018-12-05 16:12:35 +00:00
|
|
|
|
2018-12-20 00:49:56 +00:00
|
|
|
|
2019-06-19 05:43:07 +00:00
|
|
|
const ROOT_DIR = '../../../../';
|
|
|
|
const BUILD_DIR = `${ROOT_DIR}.build`;
|
|
|
|
const HACKER_DVORAK_DIR = './**/*';
|
2018-12-05 16:12:35 +00:00
|
|
|
|
2019-06-19 05:43:07 +00:00
|
|
|
const CLEAN_CMD = `rm -rf ${BUILD_DIR}`;
|
|
|
|
const BUILD_CMD = `make -C ${ROOT_DIR} ergodox_ez:hacker_dvorak`;
|
|
|
|
|
|
|
|
gulp.task('clean', run(CLEAN_CMD));
|
2018-12-05 16:12:35 +00:00
|
|
|
|
2019-06-19 05:43:07 +00:00
|
|
|
gulp.task('build', gulp.series('clean', run(BUILD_CMD, {
|
|
|
|
ignoreErrors: true
|
|
|
|
})));
|
|
|
|
|
|
|
|
gulp.task('watch', gulp.series('build', () => {
|
|
|
|
gulp.watch(HACKER_DVORAK_DIR, gulp.series('build'));
|
|
|
|
}));
|
2018-12-20 00:49:56 +00:00
|
|
|
|
2019-06-19 05:43:07 +00:00
|
|
|
gulp.task('default', gulp.series('watch'));
|