-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathstart-storybook.ts
116 lines (114 loc) · 2.72 KB
/
start-storybook.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
116
export const storybookCommonOptions: Fig.Option[] = [
{
name: "--help",
description: "Display usage information",
},
{
name: ["-V", "--version"],
description: "Display the version number",
},
{
name: ["-s", "--static-dir"],
description:
"Directory where to load static files from, comma-separated list",
args: {
name: "directory",
template: "folders",
},
},
{
name: ["-c", "--config-dir"],
description: "Directory where to load Storybook configurations from",
args: {
name: "directory",
template: "folders",
},
},
{
name: "--https",
description:
"Serve Storybook over HTTPS. Note: You must provide your own certificate information",
dependsOn: ["--ssl-cert", "--ssl-key"],
},
{
name: "--ssl-ca",
description:
"Provide an SSL certificate authority. (Optional with --https, required if using a self-signed certificate)",
args: {
name: "certificate authority",
},
},
{
name: "--ssl-cert",
description: "Provide an SSL certificate. (Required with --https)",
args: {
name: "certificate",
},
},
{
name: "--ssl-key",
description: "Provide an SSL key. (Required with --https)",
args: {
name: "key",
},
},
{
name: "--smoke-test",
description: "Exit after successful start",
},
{
name: "--ci",
description: "CI mode (skip interactive prompts, don't open browser)",
},
{
name: "--quiet",
description: "Suppress verbose build output",
},
{
name: "--no-dll",
description: "Do not use dll reference (no-op)",
},
{
name: "--debug-webpack",
description: "Display final webpack configurations for debugging purposes",
},
{
name: "--webpack-stats-json",
description: "Write Webpack Stats JSON to disk",
args: {
name: "directory",
template: "folders",
},
},
{
name: "--docs",
description: "Starts Storybook in documentation mode",
},
{
name: "--no-manager-cache",
description:
"Disables Storybook's manager caching mechanism. NOTE: this flag disables the internal caching of Storybook and can severely impact your Storybook loading time, so only use it when you need to refresh Storybook's UI, such as when editing themes",
},
];
const completionSpec: Fig.Spec = {
name: "start-storybook",
description: "Storybook start CLI tools",
options: [
{
name: ["-p", "--port"],
description: "Port to run Storybook",
args: {
name: "port",
},
},
{
name: ["-h", "--host"],
description: "Host to run Storybook",
args: {
name: "host",
},
},
...storybookCommonOptions,
],
};
export default completionSpec;