-
Notifications
You must be signed in to change notification settings - Fork 182
Expand file tree
/
Copy pathindex.ts
More file actions
40 lines (38 loc) · 1.2 KB
/
index.ts
File metadata and controls
40 lines (38 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
const subcommand = process.argv[2];
switch (subcommand) {
case 'snap-test':
const { snapTest } = await import('./snap-test.ts');
await snapTest();
break;
case 'replace-file-content':
const { replaceFileContent } = await import('./replace-file-content.ts');
replaceFileContent();
break;
case 'sync-remote':
const { syncRemote } = await import('./sync-remote-deps.ts');
await syncRemote();
break;
case 'json-sort':
const { jsonSort } = await import('./json-sort.ts');
jsonSort();
break;
case 'merge-peer-deps':
const { mergePeerDeps } = await import('./merge-peer-deps.ts');
mergePeerDeps();
break;
case 'install-global-cli':
const { installGlobalCli } = await import('./install-global-cli.ts');
installGlobalCli();
break;
case 'brand-vite':
const { brandVite } = await import('./brand-vite.ts');
brandVite();
break;
default:
console.error(`Unknown subcommand: ${subcommand}`);
console.error(
'Available subcommands: snap-test, replace-file-content, sync-remote, json-sort, merge-peer-deps, install-global-cli, brand-vite',
);
process.exit(1);
}
// Can't use top-level await if the file is not a module