astro/scripts/index.js

20 lines
420 B
JavaScript
Raw Normal View History

#!/usr/bin/env node
export default async function run() {
2021-12-22 21:11:05 +00:00
const [cmd, ...args] = process.argv.slice(2);
switch (cmd) {
case 'dev':
case 'build': {
const { default: build } = await import('./cmd/build.js');
await build(...args, cmd === 'dev' ? 'IS_DEV' : undefined);
break;
}
case 'copy': {
const { default: copy } = await import('./cmd/copy.js');
await copy(...args);
break;
}
}
}
run();