summaryrefslogtreecommitdiff
path: root/keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js')
-rw-r--r--keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js31
1 files changed, 17 insertions, 14 deletions
diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js b/keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js
index 23f19d18af..81a4e93fda 100644
--- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js
+++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js
@@ -1,19 +1,22 @@
-let gulp = require('gulp');
-let run = require('gulp-run-command').default;
+const gulp = require('gulp');
+const run = require('gulp-run-command').default;
-gulp.task('clean', run('rm -rf ../../../../.build'));
+const ROOT_DIR = '../../../../';
+const BUILD_DIR = `${ROOT_DIR}.build`;
+const HACKER_DVORAK_DIR = './**/*';
-gulp.task('build', ['clean'], run('make -C ../../../../ ergodox_ez:hacker_dvorak', {
- ignoreErrors: true
-}));
+const CLEAN_CMD = `rm -rf ${BUILD_DIR}`;
+const BUILD_CMD = `make -C ${ROOT_DIR} ergodox_ez:hacker_dvorak`;
+
+gulp.task('clean', run(CLEAN_CMD));
-gulp.task('watch', ['build'], () => {
- gulp.watch([
- 'keymap.c',
- 'config.h',
- 'rules.mk',
- ], ['build']);
-});
+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'));
+}));
-gulp.task('default', ['watch']);
+gulp.task('default', gulp.series('watch'));