ts-dev
Version:
Typescript development tools
24 lines • 804 B
JavaScript
// --experimental-specifier-resolution=node
import npmLogger from './npmLogger';
import { main, ProgamExit } from './program';
void main(async () => {
const logger = npmLogger('bin');
const [, , cmd, ...argv] = process.argv;
if (!cmd) {
logger.error('No command specified');
throw new ProgamExit();
}
let command;
if (['rmdir', 'pack'].includes(cmd)) {
// eslint-disable-next-line
command = new (await import(`./${cmd}`)).default(npmLogger(cmd));
}
else {
logger.error('Unknown command', cmd);
throw new ProgamExit();
}
// eslint-disable-next-line
await command.execute(...argv);
});
//# sourceMappingURL=ts-dev.js.map