X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=keyboards%2Fergodox_ez%2Fkeymaps%2Fhacker_dvorak%2Fgulpfile.js;h=81a4e93fda418b873f0f49ea862bb08f441554b6;hb=628e08c60661ca14313ecaef9205a1bf851b70bb;hp=23f19d18afb4bd6f63e3969c070c3c317d96747b;hpb=2d15961855460ee098d6890a2b7fa336e25ed522;p=qmk_firmware.git diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js b/keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js index 23f19d18a..81a4e93fd 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'));