astro/scripts/index.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
420 B
JavaScript
Raw Permalink Normal View History

#!/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');
2021-07-20 01:23:39 +00:00
await build(...args, cmd === 'dev' ? 'IS_DEV' : undefined);
break;
}
case 'copy': {
const { default: copy } = await import('./cmd/copy.js');
2021-07-20 01:23:39 +00:00
await copy(...args);
break;
}
}
}
run();