diff options
author | William Chang <william@factual.com> | 2019-07-13 10:18:33 -0700 |
---|---|---|
committer | William Chang <william@factual.com> | 2019-07-13 10:18:33 -0700 |
commit | 71493b2f9bbd5f3d18373c518fa14ccafcbf48fc (patch) | |
tree | 3bb3e5e496621535611e087720aa5c4d7a533e5e /keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js | |
parent | 86ad4988fe7ff64916127509d84f44c56fa097aa (diff) | |
parent | da1f05fbc19477c05c0c01bb07fabfaf1ece9d54 (diff) |
Merge branch 'master' of https://github.com/qmk/qmk_firmware
Diffstat (limited to 'keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js')
-rw-r--r-- | keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js | 31 |
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')); |