-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathcreate-t3-app.ts
115 lines (113 loc) · 3.23 KB
/
create-t3-app.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
const dirArgument: Fig.Arg = {
name: "dir",
description:
"The name of the application, as well as the name of the directory to create",
template: "folders",
isOptional: true,
suggestCurrentToken: true,
};
const completionSpec: Fig.Spec = {
name: "create-t3-app",
description: "A CLI for creating web applications with the t3 stack",
icon: "https://create.t3.gg/favicon.svg",
args: dirArgument,
options: [
{
name: "--noGit",
description:
"Explicitly tell the CLI to not initialize a new git repo in the project (default: false)",
},
{
name: "--noInstall",
description:
"Explicitly tell the CLI to not run the package manager's install command (default: false)",
},
{
name: ["-y", "--default"],
priority: 76,
description:
"Bypass the CLI and use all default options to bootstrap a new t3-app (default: false)",
},
{
name: "--CI",
description: "Boolean value if we're running in CI (default: false)",
priority: 49,
},
{
name: "--tailwind",
description:
"Experimental: Boolean value if we should install Tailwind CSS. Must be used in conjunction with `--CI`",
args: {
name: "boolean",
suggestions: [
{ name: "true", description: "Install Tailwind CSS" },
{ name: "false", description: "Do not install Tailwind CSS" },
],
},
dependsOn: ["--CI"],
priority: 49,
},
{
name: "--nextAuth",
description:
"Experimental: Boolean value if we should install NextAuth.js. Must be used in conjunction with `--CI`",
args: {
name: "boolean",
suggestions: [
{ name: "true", description: "Install NextAuth.js" },
{ name: "false", description: "Do not install NextAuth.js" },
],
},
dependsOn: ["--CI"],
priority: 49,
},
{
name: "--prisma",
description:
"Experimental: Boolean value if we should install Prisma. Must be used in conjunction with `--CI`",
args: {
name: "boolean",
suggestions: [
{ name: "true", description: "Install Prisma" },
{ name: "false", description: "Do not install Prisma" },
],
},
dependsOn: ["--CI"],
priority: 49,
},
{
name: "--trpc",
description:
"Experimental: Boolean value if we should install tRPC. Must be used in conjunction with `--CI`",
args: {
name: "boolean",
suggestions: [
{ name: "true", description: "Install tRPC" },
{ name: "false", description: "Do not install tRPC" },
],
},
dependsOn: ["--CI"],
priority: 49,
},
{
name: ["-i", "--import-alias"],
description: "Explicitly tell the CLI to use a custom import alias",
args: {
name: "alias",
suggestions: [
{ name: "~/", description: "Use the ~/ alias" },
{ name: "@/", description: "Use the @/ alias" },
],
},
},
{
name: ["-v", "--version"],
description: "Display the version number",
},
{
name: ["--help", "-h"],
description: "Display help for command",
},
],
};
export default completionSpec;