1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | Object.defineProperty(exports, "__esModule", { value: true });
|
16 | const environments_1 = require("./environments/environments");
|
17 | exports.globalArguments = [
|
18 | {
|
19 | name: 'env',
|
20 | description: 'The environment to use to specialize certain commands, ' +
|
21 | 'like build',
|
22 | type: (value) => {
|
23 | return environments_1.buildEnvironment(value);
|
24 | },
|
25 | group: 'global',
|
26 | },
|
27 | {
|
28 | name: 'entrypoint',
|
29 | description: 'The main HTML file that will be requested for all routes.',
|
30 | group: 'global',
|
31 | },
|
32 | {
|
33 | name: 'shell',
|
34 | type: String,
|
35 | description: 'The app shell HTML import',
|
36 | group: 'global',
|
37 | },
|
38 | {
|
39 | name: 'fragment',
|
40 | type: String,
|
41 | multiple: true,
|
42 | description: 'HTML imports that are loaded on-demand.',
|
43 | group: 'global',
|
44 | },
|
45 | {
|
46 | name: 'root',
|
47 | type: String,
|
48 | description: 'The root directory of your project. Defaults to the current' +
|
49 | ' working directory.',
|
50 | group: 'global',
|
51 | },
|
52 | {
|
53 | name: 'sources',
|
54 | type: String,
|
55 | multiple: true,
|
56 | description: 'Glob(s) that match your project source files. ' +
|
57 | 'Defaults to `src/**/*`.',
|
58 | group: 'global',
|
59 | },
|
60 | {
|
61 | name: 'extra-dependencies',
|
62 | type: String,
|
63 | multiple: true,
|
64 | description: 'Glob(s) that match any additional dependencies not caught ' +
|
65 | 'by the analyzer to include with your build.',
|
66 | group: 'global',
|
67 | },
|
68 | {
|
69 | name: 'npm',
|
70 | type: Boolean,
|
71 | description: 'Sets npm mode: dependencies are installed from npm, ' +
|
72 | 'component directory is "node_modules" and the package name is read ' +
|
73 | 'from package.json',
|
74 | },
|
75 | {
|
76 | name: 'module-resolution',
|
77 | description: 'Algorithm to use for resolving module specifiers in import ' +
|
78 | 'and export statements when rewriting them to be web-compatible. ' +
|
79 | 'Valid values are "none" and "node". "none" disables module specifier ' +
|
80 | 'rewriting. "node" uses Node.js resolution to find modules.',
|
81 | type: String,
|
82 |
|
83 |
|
84 |
|
85 | defaultValue: undefined,
|
86 | },
|
87 | {
|
88 | name: 'component-dir',
|
89 | type: String,
|
90 | description: 'The component directory to use. Defaults to reading from ' +
|
91 | 'the Bower config (usually bower_components/).',
|
92 | },
|
93 | {
|
94 | name: 'verbose',
|
95 | description: 'turn on debugging output',
|
96 | type: Boolean,
|
97 | alias: 'v',
|
98 | group: 'global',
|
99 | },
|
100 | {
|
101 | name: 'help',
|
102 | description: 'print out helpful usage information',
|
103 | type: Boolean,
|
104 | alias: 'h',
|
105 | group: 'global',
|
106 | },
|
107 | {
|
108 | name: 'quiet',
|
109 | description: 'silence output',
|
110 | type: Boolean,
|
111 | alias: 'q',
|
112 | group: 'global',
|
113 | },
|
114 | {
|
115 | name: 'version',
|
116 | description: 'Print version info.',
|
117 | type: Boolean,
|
118 | group: 'global',
|
119 | },
|
120 | ];
|
121 |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 | function mergeArguments(argumentLists) {
|
131 | const argsByName = new Map();
|
132 | for (const args of argumentLists) {
|
133 | for (const arg of args) {
|
134 | argsByName.set(arg.name, Object.assign({}, argsByName.get(arg.name), arg));
|
135 | }
|
136 | }
|
137 | return Array.from(argsByName.values());
|
138 | }
|
139 | exports.mergeArguments = mergeArguments;
|
140 |
|
\ | No newline at end of file |