20 lines
501 B
JavaScript
20 lines
501 B
JavaScript
|
#!/usr/bin/env node
|
||
|
export default async function run() {
|
||
|
const [cmd, ...args] = process.argv.slice(2);
|
||
|
switch (cmd) {
|
||
|
case 'dev':
|
||
|
case 'build': {
|
||
|
const { default: build } = await import('./cmd/build.js');
|
||
|
build(...args, cmd === 'dev' ? 'IS_DEV' : undefined);
|
||
|
break;
|
||
|
}
|
||
|
case 'copy': {
|
||
|
const { default: copy } = await import('./cmd/copy.js');
|
||
|
copy(...args);
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
run();
|