You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
417 B
JavaScript
12 lines
417 B
JavaScript
import { readdir, watchFile } from "fs";
|
|
import { extname } from 'path';
|
|
import { exec } from 'child_process';
|
|
readdir('.', (_, files) => {
|
|
files.filter(file => extname(file) == '.ui').forEach(file => {
|
|
console.log(`Setup modify hook for ${file}`);
|
|
watchFile(file, (curr, _) => {
|
|
console.log(`${file} modified at ${curr.mtime}.`);
|
|
exec('compile_ui');
|
|
});
|
|
})
|
|
}); |