Files
lnreader-plugins/tswatch.ts
T
nyagami 5f9a067ab9 Prettier (#852)
* add prettier

* lint-staged

* prettier

* upgrade husky
2024-03-23 22:00:29 +07:00

19 lines
400 B
TypeScript

import { TscWatchClient } from 'tsc-watch/client';
const watch = new TscWatchClient();
let port = Number(process.argv[2]);
if (!port) {
console.log(`Port not specified! Setting default 3000!
Run \`npm start -- <port>\` to change it
`);
port = 3000;
}
watch.start('--onSuccess', `node ./.js/index.js ${port}`);
try {
} catch (e) {
watch.kill(); // Fatal error, kill the compiler instance.
}