2021-04-30 16:33:35 -05:00
|
|
|
#!/usr/bin/env node
|
|
|
|
export default async function run() {
|
2021-05-03 12:47:51 -05:00
|
|
|
const [cmd, ...args] = process.argv.slice(2);
|
|
|
|
switch (cmd) {
|
|
|
|
case 'dev':
|
|
|
|
case 'build': {
|
|
|
|
const { default: build } = await import('./cmd/build.js');
|
2021-07-19 20:23:39 -05:00
|
|
|
await build(...args, cmd === 'dev' ? 'IS_DEV' : undefined);
|
2021-05-03 12:47:51 -05:00
|
|
|
break;
|
2021-04-30 16:33:35 -05:00
|
|
|
}
|
2022-06-15 07:50:05 -05:00
|
|
|
case 'prebuild': {
|
|
|
|
const { default: prebuild } = await import('./cmd/prebuild.js');
|
|
|
|
await prebuild(...args);
|
|
|
|
break;
|
|
|
|
}
|
2024-01-12 02:53:00 -05:00
|
|
|
case 'test': {
|
|
|
|
const { default: test } = await import('./cmd/test.js');
|
|
|
|
await test(...args);
|
|
|
|
break;
|
|
|
|
}
|
2021-05-03 12:47:51 -05:00
|
|
|
}
|
2021-04-30 16:33:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
run();
|