@bscotch/stitch
Version:
Stitch: The GameMaker Studio 2 Asset Pipeline Development Kit.
17 lines • 568 B
JavaScript
/**
* @file General watcher utility for
* re-running CLI commands when their
* target files change.
*/
import { debounceWatch } from '@bscotch/debounce-watch';
import { debug, error, info, warn } from '../utility/log.js';
export function runOrWatch(cliOpts, runner, watchFolder, extensions, options) {
return cliOpts.watch
? debounceWatch(runner, watchFolder, {
...options,
onlyFileExtensions: extensions,
logger: { debug, error, info, warn: warn },
})
: runner();
}
//# sourceMappingURL=watch.js.map