-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathnext.ts
101 lines (97 loc) · 2.35 KB
/
next.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
const icon = "https://nextjs.org/static/favicon/favicon-16x16.png";
const hostPortOptions: Fig.Option[] = [
{
name: ["-p", "--port"],
description: "A port number on which to start the application",
args: {},
},
{
name: ["-H", , "--hostname"],
description: "Hostname on which to start the application",
args: {},
},
];
const dirArgument: Fig.Arg = {
name: "dir",
description: "Represent the directory of the Next.js application",
template: "folders",
isOptional: true,
};
const completionSpec: Fig.Spec = {
name: "next",
description: "Next.js CLI to start, build and export your application",
options: [
{
name: ["-h", "--help"],
description: "Output usage information",
},
{
name: ["-v", "--version"],
description: "Output the version number",
},
],
subcommands: [
{
name: "build",
description: "Create an optimized production build of your application",
icon,
args: dirArgument,
options: [
{
name: "--profile",
description: "Enable production profiling",
},
{
name: "--debug",
description: "Enable more verbose build output",
},
],
},
{
name: "dev",
description: "Start the application in development mode",
icon,
args: dirArgument,
options: hostPortOptions,
},
{
name: "start",
description: "Start the application in production mode",
icon,
args: dirArgument,
options: hostPortOptions,
},
{
name: "export",
description: "Exports the application for production deployment",
icon,
args: dirArgument,
options: [
{
name: "-s",
description: "Do not print any messages to console",
},
],
},
{
name: "telemetry",
description: "Allows you to control Next.js' telemetry collection",
icon,
args: {
name: "status",
description: "Turn Next.js' telemetry collection on or off",
suggestions: [
{
name: "enable",
description: "Enable Next.js' telemetry collection",
},
{
name: "disable",
description: "Disable Next.js' telemetry collection",
},
],
},
},
],
};
export default completionSpec;