Skip to content

Instantly share code, notes, and snippets.

@Ismael-VC
Created March 8, 2024 05:40
Show Gist options
  • Save Ismael-VC/e0a81856e158d21311fcda84b9cdd64b to your computer and use it in GitHub Desktop.
Save Ismael-VC/e0a81856e158d21311fcda84b9cdd64b to your computer and use it in GitHub Desktop.
Gulp watcher for Uxntal development.
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