aboutsummaryrefslogtreecommitdiff
path: root/scripts/index.js
blob: 9025e478189ae145dea9135ba6df9398b69cd5c6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/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();