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