Created
March 8, 2024 05:40
-
-
Save Ismael-VC/e0a81856e158d21311fcda84b9cdd64b to your computer and use it in GitHub Desktop.
Gulp watcher for Uxntal development.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { exec } = require('child_process'); | |
const gulp = require('gulp'); | |
async function build() { | |
exec( | |
'clear && uxnasm test.tal test.rom && uxncli test.rom', | |
(error, stdout, stderr) => { | |
if (!(stdout.length === 0)) { | |
console.log(`${stdout}`); | |
} | |
if (!(stderr.length === 0)) { | |
console.error(`${stderr}`); | |
} | |
} | |
); | |
} | |
function watch() { | |
gulp.watch('./test.tal', build); | |
}; | |
gulp.task('default', gulp.series(build, watch)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment