-
Notifications
You must be signed in to change notification settings - Fork 313
/
Copy pathindex.ts
32 lines (27 loc) · 1.03 KB
/
index.ts
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
import { CommandMap, Namespace, execute } from '@ionic/cli-framework';
import { BuildCommand } from './commands/build';
import { DeployCommand } from './commands/deploy';
import { FindRedundantCommand } from './commands/find-redundant';
import { GenerateChecksumCommand } from './commands/generate-checksum';
import { TestCommand } from './commands/test';
class StartersNamespace extends Namespace {
async getMetadata() {
return {
name: 'ionic-starters',
summary: '',
};
}
async getCommands(): Promise<CommandMap> {
return new CommandMap([
['build', async () => new BuildCommand(this)],
['deploy', async () => new DeployCommand(this)],
['find-redundant', async () => new FindRedundantCommand(this)],
['generate-checksum', async () => new GenerateChecksumCommand(this)],
['test', async () => new TestCommand(this)],
]);
}
}
const namespace = new StartersNamespace();
export async function run(argv: string[], env: { [k: string]: string }) {
await execute({ namespace, argv, env });
}