0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00
astro/scripts/index.js
Drew Powers 4ff3add50f
Clean dependencies (#166)
* Clean dependencies

This moves some dependencies around where they should be

* Formatting
2021-05-03 11:47:51 -06:00

19 lines
439 B
JavaScript
Executable file

#!/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();