1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | import {ArgDescriptor} from 'command-line-args';
|
17 |
|
18 | export const args: ArgDescriptor[] = [
|
19 | {
|
20 | name: 'version',
|
21 | description: 'Print version info.',
|
22 | type: Boolean,
|
23 | },
|
24 | {
|
25 | name: 'root',
|
26 | description: 'The root directory of your project. Defaults to the ' +
|
27 | 'current working directory.',
|
28 | type: String,
|
29 | defaultOption: true,
|
30 | },
|
31 | {
|
32 | name: 'compile',
|
33 | description: 'Compiler options. Valid values are "auto", "always" and ' +
|
34 | '"never". "auto" compiles JavaScript to ES5 for browsers that don\'t ' +
|
35 | 'fully support ES6.',
|
36 | type: String,
|
37 | defaultValue: 'auto',
|
38 | },
|
39 | {
|
40 | name: 'module-resolution',
|
41 | description: 'Algorithm to use for resolving module specifiers in import ' +
|
42 | 'and export statements when rewriting them to be web-compatible. ' +
|
43 | 'Valid values are "none" and "node". "none" disables module specifier ' +
|
44 | 'rewriting. "node" uses Node.js resolution to find modules.',
|
45 | type: String,
|
46 | defaultValue: 'node',
|
47 | },
|
48 | {
|
49 | name: 'compile-cache',
|
50 | description: 'Maximum size in bytes (actually, UTF-8 characters) of ' +
|
51 | 'the cache used to store results for JavaScript compilation. Cache ' +
|
52 | 'size includes the uncompiled and compiled file content lengths. ' +
|
53 | 'Defaults to 52428800 (50MB).',
|
54 | type: Number,
|
55 | defaultValue: 52428800,
|
56 | },
|
57 | {
|
58 | name: 'port',
|
59 | alias: 'p',
|
60 | description: 'The port to serve from. Serve will choose an open port for ' +
|
61 | 'you by default.',
|
62 | type: Number,
|
63 | },
|
64 | {
|
65 | name: 'hostname',
|
66 | alias: 'H',
|
67 | description: 'The hostname to serve from. Defaults to localhost.',
|
68 | type: String,
|
69 | },
|
70 | {
|
71 | name: 'component-dir',
|
72 | alias: 'c',
|
73 | description: 'The component directory to use. Defaults to reading from ' +
|
74 | 'the Bower config (usually bower_components/).',
|
75 | type: String,
|
76 | },
|
77 | {
|
78 | name: 'component-url',
|
79 | alias: 'u',
|
80 | description: 'The component url to use. Defaults to reading from ' +
|
81 | 'the Bower config (usually bower_components/).',
|
82 | type: String,
|
83 | },
|
84 | {
|
85 | name: 'package-name',
|
86 | alias: 'n',
|
87 | description:
|
88 | 'The package name to use for the root directory. Defaults to ' +
|
89 | 'reading from bower.json.',
|
90 | type: String,
|
91 | },
|
92 | {
|
93 | name: 'npm',
|
94 | description: 'Sets npm mode: dependencies are installed from npm, ' +
|
95 | 'component directory is "node_modules" and the package name is read ' +
|
96 | 'from package.json',
|
97 | type: Boolean,
|
98 | },
|
99 | {
|
100 | name: 'open',
|
101 | alias: 'o',
|
102 | description: 'The page to open in the default browser on startup.',
|
103 | type: Boolean,
|
104 | },
|
105 | {
|
106 | name: 'browser',
|
107 | alias: 'b',
|
108 | description: 'The browser(s) to open with when using the --open option. ' +
|
109 | 'Defaults to your default web browser.',
|
110 | type: String,
|
111 | multiple: true,
|
112 | },
|
113 | {
|
114 | name: 'open-path',
|
115 | description: 'The URL path to open when using the --open option. ' +
|
116 | 'Defaults to "index.html".',
|
117 | type: String,
|
118 | },
|
119 | {
|
120 | name: 'protocol',
|
121 | alias: 'P',
|
122 | description: 'The server protocol to use \\{h2, https/1.1, http/1.1\\}. ' +
|
123 | 'Defaults to "http/1.1".',
|
124 | defaultValue: 'http/1.1',
|
125 | type: String,
|
126 | },
|
127 | {
|
128 | name: 'key',
|
129 | description: 'Path to TLS certificate private key file for https. ' +
|
130 | 'Defaults to "key.pem".',
|
131 | defaultValue: 'key.pem',
|
132 | type: String,
|
133 | },
|
134 | {
|
135 | name: 'cert',
|
136 | description: 'Path to TLS certificate file for https. ' +
|
137 | 'Defaults to "cert.pem".',
|
138 | defaultValue: 'cert.pem',
|
139 | type: String,
|
140 | },
|
141 | {
|
142 | name: 'manifest',
|
143 | description: 'Path to HTTP/2 Push Manifest.',
|
144 | type: String,
|
145 | },
|
146 | {
|
147 | name: 'proxy-path',
|
148 | description:
|
149 | 'Top-level path that should be redirected to the proxy-target. ' +
|
150 | 'E.g. `api/v1` when you want to redirect all requests of ' +
|
151 | '`https://localhost/api/v1/`.',
|
152 | type: String,
|
153 | },
|
154 | {
|
155 | name: 'proxy-target',
|
156 | description:
|
157 | 'Host URL to proxy to, for example `https://myredirect:8080/foo`.',
|
158 | type: String,
|
159 | },
|
160 | {
|
161 | name: 'allow-origin',
|
162 | description: 'Set the Access-Control-Allow-Origin header.',
|
163 | type: String,
|
164 | },
|
165 | ];
|