-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathignite-cli.ts
93 lines (91 loc) · 2 KB
/
ignite-cli.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
const generatorsGenerator: Fig.Generator = {
script: ["ls", "ignite/templates"],
postProcess: (out) => {
if (out.trim() === "") return [];
return out.split("\n").map((gen) => ({
name: gen,
}));
},
};
const completionSpec: Fig.Spec = {
name: "ignite-cli",
description:
"Ignite is a CLI that helps you spin up a new React Native app using a battle-tested tech stack",
options: [
{
name: ["-h", "--help"],
description: "Output usage information",
},
{
name: ["-v", "--version"],
description: "Output the version number",
},
],
subcommands: [
{
name: "new",
description: "Create a new React Native app",
args: {
name: "name",
},
options: [
{
name: "--expo",
description: "Use Expo",
},
{
name: "--bundle",
description: "Set the bundle ID of the app",
args: {
name: "bundle",
},
},
],
},
{
name: ["g", "generate"],
description: "Generate components and other app features",
args: [
{
name: "generator",
generators: generatorsGenerator,
isOptional: true,
},
{
name: "name",
isOptional: true,
},
],
options: [
{
name: "--list",
description: "List installed generators",
},
{
name: "--update",
description: "Update installed generators",
},
],
},
{
name: "update",
description: "Update installed generators",
args: {
name: "generator",
generators: generatorsGenerator,
},
options: [
{
name: "--all",
description: "Update all installed generators",
},
],
},
{
name: "doctor",
description:
"Check your environment & display versions of installed dependencies",
},
],
};
export default completionSpec;