ember-cli 4.0.0 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/.github/workflows/ci.yml +4 -4
  2. package/CHANGELOG.md +42 -2
  3. package/blueprints/addon/additional-dev-dependencies.json +1 -1
  4. package/blueprints/addon/files/.github/workflows/ci.yml +0 -1
  5. package/blueprints/addon/files/.travis.yml +0 -1
  6. package/blueprints/addon/files/addon-config/ember-try.js +0 -13
  7. package/blueprints/app/files/config/environment.js +1 -1
  8. package/blueprints/app/files/package.json +6 -6
  9. package/docs/build/data.json +3 -3
  10. package/lib/models/host-info-cache.js +3 -5
  11. package/lib/models/per-bundle-addon-cache/index.js +2 -3
  12. package/lib/tasks/npm-task.js +1 -1
  13. package/lib/utilities/get-lang-arg.js +45 -45
  14. package/package.json +25 -25
  15. package/tests/helpers/mock-project.js +1 -1
  16. package/.github/ISSUE_TEMPLATE.md +0 -12
  17. package/.github/dependabot.yml +0 -15
  18. package/.github/workflows/coverage.yml +0 -31
  19. package/docs/analytics.md +0 -44
  20. package/docs/architecture.md +0 -316
  21. package/docs/assets/architecture/Ember-CLI architecture.png +0 -0
  22. package/docs/assets/architecture/Ember-CLI architecture.xml +0 -1
  23. package/docs/assets/architecture/README.md +0 -5
  24. package/docs/brocfile-transition.md +0 -46
  25. package/docs/build/api.js +0 -44
  26. package/docs/build/assets/css/external-small.png +0 -0
  27. package/docs/build/assets/css/logo.png +0 -0
  28. package/docs/build/assets/css/main.css +0 -555
  29. package/docs/build/assets/favicon.ico +0 -0
  30. package/docs/build/assets/img/spinner.gif +0 -0
  31. package/docs/build/assets/index.html +0 -10
  32. package/docs/build/assets/js/api-filter.js +0 -56
  33. package/docs/build/assets/js/api-list.js +0 -255
  34. package/docs/build/assets/js/api-search.js +0 -98
  35. package/docs/build/assets/js/apidocs.js +0 -376
  36. package/docs/build/assets/js/yui-prettify.js +0 -17
  37. package/docs/build/assets/vendor/prettify/CHANGES.html +0 -130
  38. package/docs/build/assets/vendor/prettify/COPYING +0 -202
  39. package/docs/build/assets/vendor/prettify/README.html +0 -203
  40. package/docs/build/assets/vendor/prettify/prettify-min.css +0 -1
  41. package/docs/build/assets/vendor/prettify/prettify-min.js +0 -1
  42. package/docs/build/classes/Addon.html +0 -4318
  43. package/docs/build/classes/AmdTransformAddon.html +0 -202
  44. package/docs/build/classes/Blueprint.html +0 -4796
  45. package/docs/build/classes/Builder.html +0 -611
  46. package/docs/build/classes/CLI.html +0 -810
  47. package/docs/build/classes/Command.html +0 -1655
  48. package/docs/build/classes/DefaultPackager.html +0 -202
  49. package/docs/build/classes/EmberAddon.html +0 -2207
  50. package/docs/build/classes/EmberApp.html +0 -2225
  51. package/docs/build/classes/HardwareInfo.html +0 -620
  52. package/docs/build/classes/HistorySupportAddon.html +0 -203
  53. package/docs/build/classes/Instrumentation.html +0 -695
  54. package/docs/build/classes/NodeModulesList.html +0 -460
  55. package/docs/build/classes/NpmTask.html +0 -333
  56. package/docs/build/classes/PackageInfo.html +0 -1390
  57. package/docs/build/classes/PackageInfoCache.html +0 -963
  58. package/docs/build/classes/PerBundleAddonCache {.html +0 -1010
  59. package/docs/build/classes/Project.html +0 -2083
  60. package/docs/build/classes/ServeFilesAddon.html +0 -260
  61. package/docs/build/classes/TestsServerAddon.html +0 -203
  62. package/docs/build/classes/WatcherAddon.html +0 -204
  63. package/docs/build/classes/WindowsSymlinkChecker.html +0 -1505
  64. package/docs/build/files/lib_broccoli_default-packager.js.html +0 -1426
  65. package/docs/build/files/lib_broccoli_ember-addon.js.html +0 -159
  66. package/docs/build/files/lib_broccoli_ember-app.js.html +0 -1913
  67. package/docs/build/files/lib_cli_cli.js.html +0 -417
  68. package/docs/build/files/lib_models_addon-info.js.html +0 -112
  69. package/docs/build/files/lib_models_addon.js.html +0 -1866
  70. package/docs/build/files/lib_models_blueprint.js.html +0 -1678
  71. package/docs/build/files/lib_models_builder.js.html +0 -417
  72. package/docs/build/files/lib_models_command.js.html +0 -804
  73. package/docs/build/files/lib_models_hardware-info.js.html +0 -479
  74. package/docs/build/files/lib_models_host-info-cache.js.html +0 -428
  75. package/docs/build/files/lib_models_installation-checker.js.html +0 -181
  76. package/docs/build/files/lib_models_instantiate-addons.js.html +0 -191
  77. package/docs/build/files/lib_models_instrumentation.js.html +0 -433
  78. package/docs/build/files/lib_models_package-info-cache_index.js.html +0 -793
  79. package/docs/build/files/lib_models_package-info-cache_node-modules-list.js.html +0 -208
  80. package/docs/build/files/lib_models_package-info-cache_package-info.js.html +0 -661
  81. package/docs/build/files/lib_models_per-bundle-addon-cache_addon-proxy.js.html +0 -252
  82. package/docs/build/files/lib_models_per-bundle-addon-cache_index.js.html +0 -485
  83. package/docs/build/files/lib_models_per-bundle-addon-cache_target-instance.js.html +0 -108
  84. package/docs/build/files/lib_models_project.js.html +0 -913
  85. package/docs/build/files/lib_models_task.js.html +0 -117
  86. package/docs/build/files/lib_tasks_build-watch.js.html +0 -157
  87. package/docs/build/files/lib_tasks_npm-task.js.html +0 -463
  88. package/docs/build/files/lib_tasks_serve.js.html +0 -207
  89. package/docs/build/files/lib_tasks_server_middleware_broccoli-serve-files_index.js.html +0 -127
  90. package/docs/build/files/lib_tasks_server_middleware_broccoli-watcher_index.js.html +0 -158
  91. package/docs/build/files/lib_tasks_server_middleware_history-support_index.js.html +0 -181
  92. package/docs/build/files/lib_tasks_server_middleware_tests-server_index.js.html +0 -171
  93. package/docs/build/files/lib_tasks_test-server.js.html +0 -167
  94. package/docs/build/files/lib_tasks_transforms_amd_index.js.html +0 -143
  95. package/docs/build/files/lib_utilities_ember-app-utils.js.html +0 -292
  96. package/docs/build/files/lib_utilities_insert-into-file.js.html +0 -219
  97. package/docs/build/files/lib_utilities_is-lazy-engine.js.html +0 -125
  98. package/docs/build/files/lib_utilities_is-yarn-project.js.html +0 -120
  99. package/docs/build/files/lib_utilities_valid-project-name.js.html +0 -142
  100. package/docs/build/files/lib_utilities_will-interrupt-process.js.html +0 -290
  101. package/docs/build/files/lib_utilities_windows-admin.js.html +0 -230
  102. package/docs/build/index.html +0 -125
  103. package/docs/build/modules/ember-cli.html +0 -152
  104. package/docs/build/modules/is-lazy-engine.html +0 -106
  105. package/docs/build-concurrency.md +0 -15
  106. package/docs/build-pipeline-debugging.md +0 -33
  107. package/docs/code-coverage.md +0 -14
  108. package/docs/error-propagation.md +0 -136
  109. package/docs/experiments.md +0 -53
  110. package/docs/node-support.md +0 -43
  111. package/docs/perf-guide.md +0 -250
  112. package/docs/project_version_preprocessor.js +0 -8
  113. package/docs/sourcemaps.md +0 -60
  114. package/docs/yuidoc.json +0 -13
@@ -1,1655 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <title>Command - ember-cli</title>
6
- <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
7
- <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
8
- <script src="https://cdnjs.cloudflare.com/ajax/libs/yui/3.18.0/yui/yui-min.js"></script>
9
- </head>
10
- <body class="yui3-skin-sam">
11
-
12
- <div id="doc">
13
- <div class="yui3-g">
14
- <div id="sidebar" class="yui3-u">
15
- <div class="logo">
16
- <a href="../index.html">
17
- <img src="https://ember-cli.com/assets/images/ember-cli-logo-small-dark.png">
18
- </a>
19
- </div>
20
-
21
- <div id="modules" class="sidebox">
22
- <div class="hd">
23
- <h2 class="no-toc">Modules</h2>
24
- </div>
25
- <div class="bd">
26
- <ul>
27
- <li><a href="../modules/ember-cli.html">ember-cli</a>
28
- </li>
29
- <li><a href="../modules/is-lazy-engine.html">is-lazy-engine</a>
30
- </li>
31
- </ul>
32
- </div>
33
- </div>
34
-
35
- <div id="classes" class="sidebox">
36
- <div class="hd">
37
- <h2 class="no-toc">Classes</h2>
38
- </div>
39
- <div class="bd">
40
- <ul>
41
- <li><a href="../classes/Addon.html">Addon</a></li>
42
- <li><a href="../classes/AmdTransformAddon.html">AmdTransformAddon</a></li>
43
- <li><a href="../classes/Blueprint.html">Blueprint</a></li>
44
- <li><a href="../classes/Builder.html">Builder</a></li>
45
- <li><a href="../classes/CLI.html">CLI</a></li>
46
- <li><a href="../classes/Command.html">Command</a></li>
47
- <li><a href="../classes/DefaultPackager.html">DefaultPackager</a></li>
48
- <li><a href="../classes/EmberAddon.html">EmberAddon</a></li>
49
- <li><a href="../classes/EmberApp.html">EmberApp</a></li>
50
- <li><a href="../classes/HardwareInfo.html">HardwareInfo</a></li>
51
- <li><a href="../classes/HistorySupportAddon.html">HistorySupportAddon</a></li>
52
- <li><a href="../classes/Instrumentation.html">Instrumentation</a></li>
53
- <li><a href="../classes/NodeModulesList.html">NodeModulesList</a></li>
54
- <li><a href="../classes/NpmTask.html">NpmTask</a></li>
55
- <li><a href="../classes/PackageInfo.html">PackageInfo</a></li>
56
- <li><a href="../classes/PackageInfoCache.html">PackageInfoCache</a></li>
57
- <li><a href="../classes/PerBundleAddonCache {.html">PerBundleAddonCache {</a></li>
58
- <li><a href="../classes/Project.html">Project</a></li>
59
- <li><a href="../classes/ServeFilesAddon.html">ServeFilesAddon</a></li>
60
- <li><a href="../classes/TestsServerAddon.html">TestsServerAddon</a></li>
61
- <li><a href="../classes/WatcherAddon.html">WatcherAddon</a></li>
62
- <li><a href="../classes/WindowsSymlinkChecker.html">WindowsSymlinkChecker</a></li>
63
- </ul>
64
- </div>
65
- </div>
66
-
67
-
68
- <div id="sections" class="sidebox">
69
- <div class="hd">
70
- <h2 class="no-toc">Command</h2>
71
- </div>
72
- <div class="bd">
73
-
74
-
75
-
76
- <div><a href="#property-summary">Property Summary</a></div>
77
-
78
- <div><a href="#method-summary">Method Summary</a></div>
79
-
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
- <div><a href="#public-properties">Public Properties</a></div>
90
- <ul>
91
- <li><a href="#props_aliases">aliases</a></li>
92
- <li><a href="#props_anonymousOptions">anonymousOptions</a></li>
93
- <li><a href="#props_availableOptions">availableOptions</a></li>
94
- <li><a href="#props_description">description</a></li>
95
- <li><a href="#props_isWithinProject">isWithinProject</a></li>
96
- <li><a href="#props_name">name</a></li>
97
- <li><a href="#props_works">works</a></li>
98
- </ul>
99
-
100
-
101
-
102
- <div><a href="#public-methods">Public Methods</a></div>
103
- <ul>
104
- <li><a href="#method_assignAlias">assignAlias</a></li>
105
- <li><a href="#method_assignOption">assignOption</a></li>
106
- <li><a href="#method_beforeRun">beforeRun</a></li>
107
- <li><a href="#method_getJson">getJson</a></li>
108
- <li><a href="#method_hasOption">hasOption</a></li>
109
- <li><a href="#method_mergeDuplicateOption">mergeDuplicateOption</a></li>
110
- <li><a href="#method_normalizeOption">normalizeOption</a></li>
111
- <li><a href="#method_onInterrupt">onInterrupt</a></li>
112
- <li><a href="#method_parseAlias">parseAlias</a></li>
113
- <li><a href="#method_parseArgs">parseArgs</a></li>
114
- <li><a href="#method_printBasicHelp">printBasicHelp</a></li>
115
- <li><a href="#method_printDetailedHelp">printDetailedHelp</a></li>
116
- <li><a href="#method_registerOptions">registerOptions</a></li>
117
- <li><a href="#method_run">run</a></li>
118
- <li><a href="#method_validateAlias">validateAlias</a></li>
119
- <li><a href="#method_validateAndRun">validateAndRun</a></li>
120
- <li><a href="#method_validateOption">validateOption</a></li>
121
- </ul>
122
-
123
-
124
- <div><a href="#private-methods">Private Methods</a></div>
125
- <ul>
126
- <li><a href="#method_runTask">runTask</a></li>
127
- </ul>
128
- </div>
129
- </div>
130
-
131
-
132
-
133
- <div class="version-info">
134
- Version: 4.0.0-release-b4cbb1029f
135
- </div>
136
-
137
- </div>
138
-
139
- <div id="main" class="yui3-u">
140
- <div class="content"><div class="title">
141
- <span class="source-link"><a href="../files/lib_models_command.js.html#l42"><code>lib&#x2F;models&#x2F;command.js:42</code></a></span>
142
- <h1 class="class-name">Command</h1>
143
- </div>
144
-
145
-
146
-
147
-
148
- <div class="class-description"><p>The base class for all CLI commands.</p>
149
- </div>
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
- <h2 id="property-summary">Property Summary</h2>
158
-
159
- <table class="summary">
160
- <thead>
161
- <tr>
162
- <th colspan="2">Public Properties</th>
163
- </tr>
164
- </thead>
165
- <tbody>
166
- <tr>
167
- <td>
168
- public
169
-
170
- final
171
- </td>
172
- <td>
173
- <div class="property-name ">
174
- <a href="#props_aliases">aliases</a>: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a>
175
- </div>
176
- <div class="short-description">
177
- <p>An array of aliases for the command</p>
178
- </div>
179
- </td>
180
- </tr>
181
- <tr>
182
- <td>
183
- public
184
-
185
- final
186
- </td>
187
- <td>
188
- <div class="property-name ">
189
- <a href="#props_anonymousOptions">anonymousOptions</a>: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a>
190
- </div>
191
- <div class="short-description">
192
- <p>An array of anonymous options for the command</p>
193
- </div>
194
- </td>
195
- </tr>
196
- <tr>
197
- <td>
198
- public
199
-
200
- final
201
- </td>
202
- <td>
203
- <div class="property-name ">
204
- <a href="#props_availableOptions">availableOptions</a>: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a>
205
- </div>
206
- <div class="short-description">
207
- <p>An array of available options for the command</p>
208
- </div>
209
- </td>
210
- </tr>
211
- <tr>
212
- <td>
213
- public
214
-
215
- final
216
- </td>
217
- <td>
218
- <div class="property-name ">
219
- <a href="#props_description">description</a>: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>
220
- </div>
221
- <div class="short-description">
222
- <p>The description of what this command does.</p>
223
- </div>
224
- </td>
225
- </tr>
226
- <tr>
227
- <td>
228
- public
229
-
230
- final
231
- </td>
232
- <td>
233
- <div class="property-name ">
234
- <a href="#props_isWithinProject">isWithinProject</a>: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
235
- </div>
236
- <div class="short-description">
237
-
238
- </div>
239
- </td>
240
- </tr>
241
- <tr>
242
- <td>
243
- public
244
-
245
- final
246
- </td>
247
- <td>
248
- <div class="property-name ">
249
- <a href="#props_name">name</a>: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>
250
- </div>
251
- <div class="short-description">
252
- <p>The name of the command.</p>
253
- </div>
254
- </td>
255
- </tr>
256
- <tr>
257
- <td>
258
- public
259
-
260
- final
261
- </td>
262
- <td>
263
- <div class="property-name ">
264
- <a href="#props_works">works</a>: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>
265
- </div>
266
- <div class="short-description">
267
- <p>Does this command work everywhere or just inside or outside of projects.</p>
268
- </div>
269
- </td>
270
- </tr>
271
- </tbody>
272
- </table>
273
-
274
-
275
-
276
- <h2 id="method-summary">Method Summary</h2>
277
-
278
- <table class="summary">
279
- <thead>
280
- <tr>
281
- <th colspan="2">Public Methods</th>
282
- </tr>
283
- </thead>
284
- <tbody>
285
- <tr>
286
- <td>
287
- public
288
-
289
-
290
- </td>
291
- <td>
292
- <div class="method-name ">
293
- <a href="#method_assignAlias">assignAlias</a>(option, alias): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
294
- </div>
295
- <div class="short-description">
296
-
297
- </div>
298
- </td>
299
- </tr>
300
- <tr>
301
- <td>
302
- public
303
-
304
-
305
- </td>
306
- <td>
307
- <div class="method-name ">
308
- <a href="#method_assignOption">assignOption</a>(option, parsedOptions, commandOptions): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
309
- </div>
310
- <div class="short-description">
311
- <p>Assigns option</p>
312
- </div>
313
- </td>
314
- </tr>
315
- <tr>
316
- <td>
317
- public
318
-
319
-
320
- </td>
321
- <td>
322
- <div class="method-name ">
323
- <a href="#method_beforeRun">beforeRun</a>( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="crosslink external" target="_blank">Promise</a> | Null
324
- </div>
325
- <div class="short-description">
326
- <p>Hook for extending a command before it is run in the cli.run command. Most common use case would be to extend availableOptions.</p>
327
- </div>
328
- </td>
329
- </tr>
330
- <tr>
331
- <td>
332
- public
333
-
334
-
335
- </td>
336
- <td>
337
- <div class="method-name ">
338
- <a href="#method_getJson">getJson</a>(options): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>
339
- </div>
340
- <div class="short-description">
341
-
342
- </div>
343
- </td>
344
- </tr>
345
- <tr>
346
- <td>
347
- public
348
-
349
-
350
- </td>
351
- <td>
352
- <div class="method-name ">
353
- <a href="#method_hasOption">hasOption</a>(name): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
354
- </div>
355
- <div class="short-description">
356
- <p>Reports if the given command has a command line option by a given name</p>
357
- </div>
358
- </td>
359
- </tr>
360
- <tr>
361
- <td>
362
- public
363
-
364
-
365
- </td>
366
- <td>
367
- <div class="method-name ">
368
- <a href="#method_mergeDuplicateOption">mergeDuplicateOption</a>(key): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>
369
- </div>
370
- <div class="short-description">
371
- <p>Merges any options with duplicate keys in the availableOptions array. Used primarily by registerOptions.</p>
372
- </div>
373
- </td>
374
- </tr>
375
- <tr>
376
- <td>
377
- public
378
-
379
-
380
- </td>
381
- <td>
382
- <div class="method-name ">
383
- <a href="#method_normalizeOption">normalizeOption</a>(option): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>
384
- </div>
385
- <div class="short-description">
386
- <p>Normalizes option, filling in implicit values</p>
387
- </div>
388
- </td>
389
- </tr>
390
- <tr>
391
- <td>
392
- public
393
-
394
-
395
- </td>
396
- <td>
397
- <div class="method-name ">
398
- <a href="#method_onInterrupt">onInterrupt</a>( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="crosslink external" target="_blank">Promise</a> | Undefined
399
- </div>
400
- <div class="short-description">
401
- <p>Called when command is interrupted from outside, e.g. ctrl+C or process kill Can be used to cleanup artifacts produced by command and control process exit code</p>
402
- </div>
403
- </td>
404
- </tr>
405
- <tr>
406
- <td>
407
- public
408
-
409
-
410
- </td>
411
- <td>
412
- <div class="method-name ">
413
- <a href="#method_parseAlias">parseAlias</a>(option, alias): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>
414
- </div>
415
- <div class="short-description">
416
- <p>Parses alias for an option and adds it to optionsAliases</p>
417
- </div>
418
- </td>
419
- </tr>
420
- <tr>
421
- <td>
422
- public
423
-
424
-
425
- </td>
426
- <td>
427
- <div class="method-name ">
428
- <a href="#method_parseArgs">parseArgs</a>(commandArgs): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> | Null
429
- </div>
430
- <div class="short-description">
431
- <p>Parses command arguments and processes</p>
432
- </div>
433
- </td>
434
- </tr>
435
- <tr>
436
- <td>
437
- public
438
-
439
-
440
- </td>
441
- <td>
442
- <div class="method-name ">
443
- <a href="#method_printBasicHelp">printBasicHelp</a>( )
444
- </div>
445
- <div class="short-description">
446
- <p>Prints basic help for the command.</p>
447
- </div>
448
- </td>
449
- </tr>
450
- <tr>
451
- <td>
452
- public
453
-
454
-
455
- </td>
456
- <td>
457
- <div class="method-name ">
458
- <a href="#method_printDetailedHelp">printDetailedHelp</a>( )
459
- </div>
460
- <div class="short-description">
461
- <p>Prints detailed help for the command.</p>
462
- </div>
463
- </td>
464
- </tr>
465
- <tr>
466
- <td>
467
- public
468
-
469
-
470
- </td>
471
- <td>
472
- <div class="method-name ">
473
- <a href="#method_registerOptions">registerOptions</a>(options)
474
- </div>
475
- <div class="short-description">
476
- <p>Registers options with command. This method provides the ability to extend or override command options. Expects an object containing anonymousOptions or availableOptions, which it will then merge with existing availableOptions before building the optionsAliases which are used to define shorthands.</p>
477
- </div>
478
- </td>
479
- </tr>
480
- <tr>
481
- <td>
482
- public
483
-
484
-
485
- </td>
486
- <td>
487
- <div class="method-name ">
488
- <a href="#method_run">run</a>(commandArgs)
489
- </div>
490
- <div class="short-description">
491
-
492
- </div>
493
- </td>
494
- </tr>
495
- <tr>
496
- <td>
497
- public
498
-
499
-
500
- </td>
501
- <td>
502
- <div class="method-name ">
503
- <a href="#method_validateAlias">validateAlias</a>(alias): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
504
- </div>
505
- <div class="short-description">
506
- <p>Validates alias value</p>
507
- </div>
508
- </td>
509
- </tr>
510
- <tr>
511
- <td>
512
- public
513
-
514
-
515
- </td>
516
- <td>
517
- <div class="method-name ">
518
- <a href="#method_validateAndRun">validateAndRun</a>( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="crosslink external" target="_blank">Promise</a>
519
- </div>
520
- <div class="short-description">
521
-
522
- </div>
523
- </td>
524
- </tr>
525
- <tr>
526
- <td>
527
- public
528
-
529
-
530
- </td>
531
- <td>
532
- <div class="method-name ">
533
- <a href="#method_validateOption">validateOption</a>(option): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
534
- </div>
535
- <div class="short-description">
536
- <p>Validates option</p>
537
- </div>
538
- </td>
539
- </tr>
540
- </tbody>
541
- </table>
542
-
543
-
544
- <table class="summary">
545
- <thead>
546
- <tr>
547
- <th colspan="2">Private Methods</th>
548
- </tr>
549
- </thead>
550
- <tbody>
551
- <tr>
552
- <td>
553
- private
554
-
555
-
556
- </td>
557
- <td>
558
- <div class="method-name ">
559
- <a href="#method_runTask">runTask</a>(name, options): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="crosslink external" target="_blank">Promise</a>
560
- </div>
561
- <div class="short-description">
562
- <p>Looks up for the task and runs It also keeps the reference for the current active task Keeping reference for the current task allows to cleanup task on interruption</p>
563
- </div>
564
- </td>
565
- </tr>
566
- </tbody>
567
- </table>
568
-
569
-
570
-
571
-
572
-
573
-
574
-
575
-
576
-
577
-
578
- <div id="properties public">
579
- <h2 id="public-properties">Public Properties</h2>
580
- <div class="property item">
581
- <div id="props_aliases" class="title">
582
- <span class="source-link"><a href="../files/lib_models_command.js.html#l100"><code>lib&#x2F;models&#x2F;command.js:100</code></a></span>
583
- <h3 class="">
584
- public
585
-
586
- final
587
- aliases: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a>
588
- </h3>
589
- </div>
590
-
591
-
592
- <div class="property-description"><p>An array of aliases for the command</p>
593
- </div>
594
-
595
- <h4>Example:</h4>
596
- <p><code>['g']</code> for the <code>generate</code> command</p>
597
-
598
- </div>
599
- <div class="property item">
600
- <div id="props_anonymousOptions" class="title">
601
- <span class="source-link"><a href="../files/lib_models_command.js.html#l138"><code>lib&#x2F;models&#x2F;command.js:138</code></a></span>
602
- <h3 class="">
603
- public
604
-
605
- final
606
- anonymousOptions: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a>
607
- </h3>
608
- </div>
609
-
610
-
611
- <div class="property-description"><p>An array of anonymous options for the command</p>
612
- </div>
613
-
614
- <h4>Example:</h4>
615
- <pre class="code prettyprint"><code class="language-js">anonymousOptions: [
616
- '&lt;blueprint&gt;'
617
- ],
618
- </code></pre>
619
-
620
- </div>
621
- <div class="property item">
622
- <div id="props_availableOptions" class="title">
623
- <span class="source-link"><a href="../files/lib_models_command.js.html#l117"><code>lib&#x2F;models&#x2F;command.js:117</code></a></span>
624
- <h3 class="">
625
- public
626
-
627
- final
628
- availableOptions: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a>
629
- </h3>
630
- </div>
631
-
632
-
633
- <div class="property-description"><p>An array of available options for the command</p>
634
- </div>
635
-
636
- <h4>Example:</h4>
637
- <pre class="code prettyprint"><code class="language-js">availableOptions: [
638
- { name: 'dry-run', type: Boolean, default: false, aliases: ['d'] },
639
- { name: 'verbose', type: Boolean, default: false, aliases: ['v'] },
640
- { name: 'blueprint', type: String, default: 'app', aliases: ['b'] },
641
- { name: 'skip-npm', type: Boolean, default: false, aliases: ['sn'] },
642
- { name: 'skip-bower', type: Boolean, default: false, aliases: ['sb'] },
643
- { name: 'skip-git', type: Boolean, default: false, aliases: ['sg'] },
644
- { name: 'directory', type: String , aliases: ['dir'] }
645
- ],
646
- </code></pre>
647
-
648
- </div>
649
- <div class="property item">
650
- <div id="props_description" class="title">
651
- <span class="source-link"><a href="../files/lib_models_command.js.html#l51"><code>lib&#x2F;models&#x2F;command.js:51</code></a></span>
652
- <h3 class="">
653
- public
654
-
655
- final
656
- description: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>
657
- </h3>
658
- </div>
659
-
660
-
661
- <div class="property-description"><p>The description of what this command does.</p>
662
- </div>
663
-
664
- </div>
665
- <div class="property item">
666
- <div id="props_isWithinProject" class="title">
667
- <span class="source-link"><a href="../files/lib_models_command.js.html#l81"><code>lib&#x2F;models&#x2F;command.js:81</code></a></span>
668
- <h3 class="">
669
- public
670
-
671
- final
672
- isWithinProject: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
673
- </h3>
674
- </div>
675
-
676
-
677
- <div class="property-description"></div>
678
-
679
- </div>
680
- <div class="property item">
681
- <div id="props_name" class="title">
682
- <span class="source-link"><a href="../files/lib_models_command.js.html#l88"><code>lib&#x2F;models&#x2F;command.js:88</code></a></span>
683
- <h3 class="">
684
- public
685
-
686
- final
687
- name: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>
688
- </h3>
689
- </div>
690
-
691
-
692
- <div class="property-description"><p>The name of the command.</p>
693
- </div>
694
-
695
- <h4>Example:</h4>
696
- <p><code>new</code> or <code>generate</code></p>
697
-
698
- </div>
699
- <div class="property item">
700
- <div id="props_works" class="title">
701
- <span class="source-link"><a href="../files/lib_models_command.js.html#l60"><code>lib&#x2F;models&#x2F;command.js:60</code></a></span>
702
- <h3 class="">
703
- public
704
-
705
- final
706
- works: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>
707
- </h3>
708
- </div>
709
-
710
-
711
- <div class="property-description"><p>Does this command work everywhere or just inside or outside of projects.</p>
712
- <p>Possible values:</p>
713
- <ul>
714
- <li><code>insideProject</code></li>
715
- <li><code>outsideProject</code></li>
716
- <li><code>everywhere</code></li>
717
- </ul>
718
- </div>
719
-
720
- </div>
721
- </div>
722
-
723
-
724
-
725
- <div id="methods public">
726
- <h2 id="public-methods">Public Methods</h2>
727
- <div class="method item">
728
- <div id="method_assignAlias" class="title">
729
- <span class="source-link"><a href="../files/lib_models_command.js.html#l494"><code>lib&#x2F;models&#x2F;command.js:494</code></a></span>
730
- <h3 class="">
731
- public
732
-
733
-
734
- assignAlias(option, alias): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
735
- </h3>
736
- </div>
737
-
738
-
739
-
740
- <div class="method-description"></div>
741
-
742
- <div class="params">
743
- <h4>Parameters:</h4>
744
- <table>
745
- <thead>
746
- <tr>
747
- <th>Name</th>
748
- <th>Type</th>
749
- <th>Attribute</th>
750
- <th>Description</th>
751
- </tr>
752
- </thead>
753
- <tbody>
754
- <tr>
755
- <td>option</td>
756
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
757
- <td>
758
- <ul>
759
-
760
-
761
-
762
- </ul>
763
- </td>
764
- <td> </td>
765
- </tr>
766
-
767
- <tr>
768
- <td>alias</td>
769
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
770
- <td>
771
- <ul>
772
-
773
-
774
-
775
- </ul>
776
- </td>
777
- <td> </td>
778
- </tr>
779
-
780
- </tbody>
781
- </table>
782
- </div>
783
-
784
- <div class="return">
785
- <h4>Return:</h4>
786
- <div>
787
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
788
- <span class="return-description"></span>
789
- </div>
790
- </div>
791
-
792
-
793
- </div>
794
- <div class="method item">
795
- <div id="method_assignOption" class="title">
796
- <span class="source-link"><a href="../files/lib_models_command.js.html#l390"><code>lib&#x2F;models&#x2F;command.js:390</code></a></span>
797
- <h3 class="">
798
- public
799
-
800
-
801
- assignOption(option, parsedOptions, commandOptions): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
802
- </h3>
803
- </div>
804
-
805
-
806
-
807
- <div class="method-description"><p>Assigns option</p>
808
- </div>
809
-
810
- <div class="params">
811
- <h4>Parameters:</h4>
812
- <table>
813
- <thead>
814
- <tr>
815
- <th>Name</th>
816
- <th>Type</th>
817
- <th>Attribute</th>
818
- <th>Description</th>
819
- </tr>
820
- </thead>
821
- <tbody>
822
- <tr>
823
- <td>option</td>
824
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
825
- <td>
826
- <ul>
827
-
828
-
829
-
830
- </ul>
831
- </td>
832
- <td> </td>
833
- </tr>
834
-
835
- <tr>
836
- <td>parsedOptions</td>
837
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
838
- <td>
839
- <ul>
840
-
841
-
842
-
843
- </ul>
844
- </td>
845
- <td> </td>
846
- </tr>
847
-
848
- <tr>
849
- <td>commandOptions</td>
850
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
851
- <td>
852
- <ul>
853
-
854
-
855
-
856
- </ul>
857
- </td>
858
- <td> </td>
859
- </tr>
860
-
861
- </tbody>
862
- </table>
863
- </div>
864
-
865
- <div class="return">
866
- <h4>Return:</h4>
867
- <div>
868
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
869
- <span class="return-description"></span>
870
- </div>
871
- </div>
872
-
873
-
874
- </div>
875
- <div class="method item">
876
- <div id="method_beforeRun" class="title">
877
- <span class="source-link"><a href="../files/lib_models_command.js.html#l249"><code>lib&#x2F;models&#x2F;command.js:249</code></a></span>
878
- <h3 class="">
879
- public
880
-
881
-
882
- beforeRun( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="crosslink external" target="_blank">Promise</a> | Null
883
- </h3>
884
- </div>
885
-
886
-
887
-
888
- <div class="method-description"><p>Hook for extending a command before it is run in the cli.run command.
889
- Most common use case would be to extend availableOptions.</p>
890
- </div>
891
-
892
-
893
- <div class="return">
894
- <h4>Return:</h4>
895
- <div>
896
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="crosslink external" target="_blank">Promise</a> | Null</span>
897
- <span class="return-description"></span>
898
- </div>
899
- </div>
900
-
901
-
902
- </div>
903
- <div class="method item">
904
- <div id="method_getJson" class="title">
905
- <span class="source-link"><a href="../files/lib_models_command.js.html#l648"><code>lib&#x2F;models&#x2F;command.js:648</code></a></span>
906
- <h3 class="">
907
- public
908
-
909
-
910
- getJson(options): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>
911
- </h3>
912
- </div>
913
-
914
-
915
-
916
- <div class="method-description"></div>
917
-
918
- <div class="params">
919
- <h4>Parameters:</h4>
920
- <table>
921
- <thead>
922
- <tr>
923
- <th>Name</th>
924
- <th>Type</th>
925
- <th>Attribute</th>
926
- <th>Description</th>
927
- </tr>
928
- </thead>
929
- <tbody>
930
- <tr>
931
- <td>options</td>
932
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
933
- <td>
934
- <ul>
935
-
936
-
937
-
938
- </ul>
939
- </td>
940
- <td> </td>
941
- </tr>
942
-
943
- </tbody>
944
- </table>
945
- </div>
946
-
947
- <div class="return">
948
- <h4>Return:</h4>
949
- <div>
950
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
951
- <span class="return-description"></span>
952
- </div>
953
- </div>
954
-
955
-
956
- </div>
957
- <div class="method item">
958
- <div id="method_hasOption" class="title">
959
- <span class="source-link"><a href="../files/lib_models_command.js.html#l322"><code>lib&#x2F;models&#x2F;command.js:322</code></a></span>
960
- <h3 class="">
961
- public
962
-
963
-
964
- hasOption(name): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
965
- </h3>
966
- </div>
967
-
968
-
969
-
970
- <div class="method-description"><p>Reports if the given command has a command line option by a given name</p>
971
- </div>
972
-
973
- <div class="params">
974
- <h4>Parameters:</h4>
975
- <table>
976
- <thead>
977
- <tr>
978
- <th>Name</th>
979
- <th>Type</th>
980
- <th>Attribute</th>
981
- <th>Description</th>
982
- </tr>
983
- </thead>
984
- <tbody>
985
- <tr>
986
- <td>name</td>
987
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></td>
988
- <td>
989
- <ul>
990
-
991
-
992
-
993
- </ul>
994
- </td>
995
- <td> </td>
996
- </tr>
997
-
998
- </tbody>
999
- </table>
1000
- </div>
1001
-
1002
- <div class="return">
1003
- <h4>Return:</h4>
1004
- <div>
1005
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
1006
- <span class="return-description"></span>
1007
- </div>
1008
- </div>
1009
-
1010
-
1011
- </div>
1012
- <div class="method item">
1013
- <div id="method_mergeDuplicateOption" class="title">
1014
- <span class="source-link"><a href="../files/lib_models_command.js.html#l338"><code>lib&#x2F;models&#x2F;command.js:338</code></a></span>
1015
- <h3 class="">
1016
- public
1017
-
1018
-
1019
- mergeDuplicateOption(key): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>
1020
- </h3>
1021
- </div>
1022
-
1023
-
1024
-
1025
- <div class="method-description"><p>Merges any options with duplicate keys in the availableOptions array.
1026
- Used primarily by registerOptions.</p>
1027
- </div>
1028
-
1029
- <div class="params">
1030
- <h4>Parameters:</h4>
1031
- <table>
1032
- <thead>
1033
- <tr>
1034
- <th>Name</th>
1035
- <th>Type</th>
1036
- <th>Attribute</th>
1037
- <th>Description</th>
1038
- </tr>
1039
- </thead>
1040
- <tbody>
1041
- <tr>
1042
- <td>key</td>
1043
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></td>
1044
- <td>
1045
- <ul>
1046
-
1047
-
1048
-
1049
- </ul>
1050
- </td>
1051
- <td> </td>
1052
- </tr>
1053
-
1054
- </tbody>
1055
- </table>
1056
- </div>
1057
-
1058
- <div class="return">
1059
- <h4>Return:</h4>
1060
- <div>
1061
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
1062
- <span class="return-description"></span>
1063
- </div>
1064
- </div>
1065
-
1066
-
1067
- </div>
1068
- <div class="method item">
1069
- <div id="method_normalizeOption" class="title">
1070
- <span class="source-link"><a href="../files/lib_models_command.js.html#l378"><code>lib&#x2F;models&#x2F;command.js:378</code></a></span>
1071
- <h3 class="">
1072
- public
1073
-
1074
-
1075
- normalizeOption(option): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>
1076
- </h3>
1077
- </div>
1078
-
1079
-
1080
-
1081
- <div class="method-description"><p>Normalizes option, filling in implicit values</p>
1082
- </div>
1083
-
1084
- <div class="params">
1085
- <h4>Parameters:</h4>
1086
- <table>
1087
- <thead>
1088
- <tr>
1089
- <th>Name</th>
1090
- <th>Type</th>
1091
- <th>Attribute</th>
1092
- <th>Description</th>
1093
- </tr>
1094
- </thead>
1095
- <tbody>
1096
- <tr>
1097
- <td>option</td>
1098
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
1099
- <td>
1100
- <ul>
1101
-
1102
-
1103
-
1104
- </ul>
1105
- </td>
1106
- <td> </td>
1107
- </tr>
1108
-
1109
- </tbody>
1110
- </table>
1111
- </div>
1112
-
1113
- <div class="return">
1114
- <h4>Return:</h4>
1115
- <div>
1116
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
1117
- <span class="return-description"></span>
1118
- </div>
1119
- </div>
1120
-
1121
-
1122
- </div>
1123
- <div class="method item">
1124
- <div id="method_onInterrupt" class="title">
1125
- <span class="source-link"><a href="../files/lib_models_command.js.html#l180"><code>lib&#x2F;models&#x2F;command.js:180</code></a></span>
1126
- <h3 class="">
1127
- public
1128
-
1129
-
1130
- onInterrupt( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="crosslink external" target="_blank">Promise</a> | Undefined
1131
- </h3>
1132
- </div>
1133
-
1134
-
1135
-
1136
- <div class="method-description"><p>Called when command is interrupted from outside, e.g. ctrl+C or process kill
1137
- Can be used to cleanup artifacts produced by command and control process exit code</p>
1138
- </div>
1139
-
1140
-
1141
- <div class="return">
1142
- <h4>Return:</h4>
1143
- <div>
1144
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="crosslink external" target="_blank">Promise</a> | Undefined</span>
1145
- <span class="return-description"><p>if rejected promise then result of promise will be used as an exit code</p>
1146
- </span>
1147
- </div>
1148
- </div>
1149
-
1150
-
1151
- </div>
1152
- <div class="method item">
1153
- <div id="method_parseAlias" class="title">
1154
- <span class="source-link"><a href="../files/lib_models_command.js.html#l449"><code>lib&#x2F;models&#x2F;command.js:449</code></a></span>
1155
- <h3 class="">
1156
- public
1157
-
1158
-
1159
- parseAlias(option, alias): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>
1160
- </h3>
1161
- </div>
1162
-
1163
-
1164
-
1165
- <div class="method-description"><p>Parses alias for an option and adds it to optionsAliases</p>
1166
- </div>
1167
-
1168
- <div class="params">
1169
- <h4>Parameters:</h4>
1170
- <table>
1171
- <thead>
1172
- <tr>
1173
- <th>Name</th>
1174
- <th>Type</th>
1175
- <th>Attribute</th>
1176
- <th>Description</th>
1177
- </tr>
1178
- </thead>
1179
- <tbody>
1180
- <tr>
1181
- <td>option</td>
1182
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
1183
- <td>
1184
- <ul>
1185
-
1186
-
1187
-
1188
- </ul>
1189
- </td>
1190
- <td> </td>
1191
- </tr>
1192
-
1193
- <tr>
1194
- <td>alias</td>
1195
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></td>
1196
- <td>
1197
- <ul>
1198
-
1199
-
1200
-
1201
- </ul>
1202
- </td>
1203
- <td> </td>
1204
- </tr>
1205
-
1206
- </tbody>
1207
- </table>
1208
- </div>
1209
-
1210
- <div class="return">
1211
- <h4>Return:</h4>
1212
- <div>
1213
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
1214
- <span class="return-description"></span>
1215
- </div>
1216
- </div>
1217
-
1218
-
1219
- </div>
1220
- <div class="method item">
1221
- <div id="method_parseArgs" class="title">
1222
- <span class="source-link"><a href="../files/lib_models_command.js.html#l541"><code>lib&#x2F;models&#x2F;command.js:541</code></a></span>
1223
- <h3 class="">
1224
- public
1225
-
1226
-
1227
- parseArgs(commandArgs): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> | Null
1228
- </h3>
1229
- </div>
1230
-
1231
-
1232
-
1233
- <div class="method-description"><p>Parses command arguments and processes</p>
1234
- </div>
1235
-
1236
- <div class="params">
1237
- <h4>Parameters:</h4>
1238
- <table>
1239
- <thead>
1240
- <tr>
1241
- <th>Name</th>
1242
- <th>Type</th>
1243
- <th>Attribute</th>
1244
- <th>Description</th>
1245
- </tr>
1246
- </thead>
1247
- <tbody>
1248
- <tr>
1249
- <td>commandArgs</td>
1250
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
1251
- <td>
1252
- <ul>
1253
-
1254
-
1255
-
1256
- </ul>
1257
- </td>
1258
- <td> </td>
1259
- </tr>
1260
-
1261
- </tbody>
1262
- </table>
1263
- </div>
1264
-
1265
- <div class="return">
1266
- <h4>Return:</h4>
1267
- <div>
1268
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> | Null</span>
1269
- <span class="return-description"></span>
1270
- </div>
1271
- </div>
1272
-
1273
-
1274
- </div>
1275
- <div class="method item">
1276
- <div id="method_printBasicHelp" class="title">
1277
- <span class="source-link"><a href="../files/lib_models_command.js.html#l607"><code>lib&#x2F;models&#x2F;command.js:607</code></a></span>
1278
- <h3 class="">
1279
- public
1280
-
1281
-
1282
- printBasicHelp( )
1283
- </h3>
1284
- </div>
1285
-
1286
-
1287
-
1288
- <div class="method-description"><p>Prints basic help for the command.</p>
1289
- <p>Basic help looks like this:</p>
1290
- <pre class="code prettyprint"><code>ember generate &lt;blueprint&gt; &lt;options...&gt;
1291
- Generates new code from blueprints
1292
- aliases: g
1293
- --dry-run (Default: false)
1294
- --verbose (Default: false)
1295
- </code></pre>
1296
- <p>The default implementation is designed to cover all bases
1297
- but may be overridden if necessary.</p>
1298
- </div>
1299
-
1300
-
1301
-
1302
-
1303
- </div>
1304
- <div class="method item">
1305
- <div id="method_printDetailedHelp" class="title">
1306
- <span class="source-link"><a href="../files/lib_models_command.js.html#l638"><code>lib&#x2F;models&#x2F;command.js:638</code></a></span>
1307
- <h3 class="">
1308
- public
1309
-
1310
-
1311
- printDetailedHelp( )
1312
- </h3>
1313
- </div>
1314
-
1315
-
1316
-
1317
- <div class="method-description"><p>Prints detailed help for the command.</p>
1318
- <p>The default implementation is no-op and should be overridden
1319
- for each command where further help text is required.</p>
1320
- </div>
1321
-
1322
-
1323
-
1324
-
1325
- </div>
1326
- <div class="method item">
1327
- <div id="method_registerOptions" class="title">
1328
- <span class="source-link"><a href="../files/lib_models_command.js.html#l154"><code>lib&#x2F;models&#x2F;command.js:154</code></a></span>
1329
- <h3 class="">
1330
- public
1331
-
1332
-
1333
- registerOptions(options)
1334
- </h3>
1335
- </div>
1336
-
1337
-
1338
-
1339
- <div class="method-description"><p>Registers options with command. This method provides the ability to extend or override command options.
1340
- Expects an object containing anonymousOptions or availableOptions, which it will then merge with
1341
- existing availableOptions before building the optionsAliases which are used to define shorthands.</p>
1342
- </div>
1343
-
1344
- <div class="params">
1345
- <h4>Parameters:</h4>
1346
- <table>
1347
- <thead>
1348
- <tr>
1349
- <th>Name</th>
1350
- <th>Type</th>
1351
- <th>Attribute</th>
1352
- <th>Description</th>
1353
- </tr>
1354
- </thead>
1355
- <tbody>
1356
- <tr>
1357
- <td>options</td>
1358
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
1359
- <td>
1360
- <ul>
1361
-
1362
-
1363
-
1364
- </ul>
1365
- </td>
1366
- <td> </td>
1367
- </tr>
1368
-
1369
- </tbody>
1370
- </table>
1371
- </div>
1372
-
1373
-
1374
-
1375
- </div>
1376
- <div class="method item">
1377
- <div id="method_run" class="title">
1378
- <span class="source-link"><a href="../files/lib_models_command.js.html#l597"><code>lib&#x2F;models&#x2F;command.js:597</code></a></span>
1379
- <h3 class="">
1380
- public
1381
-
1382
-
1383
- run(commandArgs)
1384
- </h3>
1385
- </div>
1386
-
1387
-
1388
-
1389
- <div class="method-description"></div>
1390
-
1391
- <div class="params">
1392
- <h4>Parameters:</h4>
1393
- <table>
1394
- <thead>
1395
- <tr>
1396
- <th>Name</th>
1397
- <th>Type</th>
1398
- <th>Attribute</th>
1399
- <th>Description</th>
1400
- </tr>
1401
- </thead>
1402
- <tbody>
1403
- <tr>
1404
- <td>commandArgs</td>
1405
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
1406
- <td>
1407
- <ul>
1408
-
1409
-
1410
-
1411
- </ul>
1412
- </td>
1413
- <td> </td>
1414
- </tr>
1415
-
1416
- </tbody>
1417
- </table>
1418
- </div>
1419
-
1420
-
1421
-
1422
- </div>
1423
- <div class="method item">
1424
- <div id="method_validateAlias" class="title">
1425
- <span class="source-link"><a href="../files/lib_models_command.js.html#l509"><code>lib&#x2F;models&#x2F;command.js:509</code></a></span>
1426
- <h3 class="">
1427
- public
1428
-
1429
-
1430
- validateAlias(alias): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
1431
- </h3>
1432
- </div>
1433
-
1434
-
1435
-
1436
- <div class="method-description"><p>Validates alias value</p>
1437
- </div>
1438
-
1439
- <div class="params">
1440
- <h4>Parameters:</h4>
1441
- <table>
1442
- <thead>
1443
- <tr>
1444
- <th>Name</th>
1445
- <th>Type</th>
1446
- <th>Attribute</th>
1447
- <th>Description</th>
1448
- </tr>
1449
- </thead>
1450
- <tbody>
1451
- <tr>
1452
- <td>alias</td>
1453
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
1454
- <td>
1455
- <ul>
1456
-
1457
-
1458
-
1459
- </ul>
1460
- </td>
1461
- <td> </td>
1462
- </tr>
1463
-
1464
- </tbody>
1465
- </table>
1466
- </div>
1467
-
1468
- <div class="return">
1469
- <h4>Return:</h4>
1470
- <div>
1471
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
1472
- <span class="return-description"></span>
1473
- </div>
1474
- </div>
1475
-
1476
-
1477
- </div>
1478
- <div class="method item">
1479
- <div id="method_validateAndRun" class="title">
1480
- <span class="source-link"><a href="../files/lib_models_command.js.html#l257"><code>lib&#x2F;models&#x2F;command.js:257</code></a></span>
1481
- <h3 class="">
1482
- public
1483
-
1484
-
1485
- validateAndRun( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="crosslink external" target="_blank">Promise</a>
1486
- </h3>
1487
- </div>
1488
-
1489
-
1490
-
1491
- <div class="method-description"></div>
1492
-
1493
-
1494
- <div class="return">
1495
- <h4>Return:</h4>
1496
- <div>
1497
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="crosslink external" target="_blank">Promise</a></span>
1498
- <span class="return-description"></span>
1499
- </div>
1500
- </div>
1501
-
1502
-
1503
- </div>
1504
- <div class="method item">
1505
- <div id="method_validateOption" class="title">
1506
- <span class="source-link"><a href="../files/lib_models_command.js.html#l423"><code>lib&#x2F;models&#x2F;command.js:423</code></a></span>
1507
- <h3 class="">
1508
- public
1509
-
1510
-
1511
- validateOption(option): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
1512
- </h3>
1513
- </div>
1514
-
1515
-
1516
-
1517
- <div class="method-description"><p>Validates option</p>
1518
- </div>
1519
-
1520
- <div class="params">
1521
- <h4>Parameters:</h4>
1522
- <table>
1523
- <thead>
1524
- <tr>
1525
- <th>Name</th>
1526
- <th>Type</th>
1527
- <th>Attribute</th>
1528
- <th>Description</th>
1529
- </tr>
1530
- </thead>
1531
- <tbody>
1532
- <tr>
1533
- <td>option</td>
1534
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
1535
- <td>
1536
- <ul>
1537
-
1538
-
1539
-
1540
- </ul>
1541
- </td>
1542
- <td> </td>
1543
- </tr>
1544
-
1545
- </tbody>
1546
- </table>
1547
- </div>
1548
-
1549
- <div class="return">
1550
- <h4>Return:</h4>
1551
- <div>
1552
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
1553
- <span class="return-description"></span>
1554
- </div>
1555
- </div>
1556
-
1557
-
1558
- </div>
1559
- </div>
1560
-
1561
-
1562
- <div id="methods private">
1563
- <h2 id="private-methods">Private Methods</h2>
1564
- <div class="method item private">
1565
- <div id="method_runTask" class="title">
1566
- <span class="source-link"><a href="../files/lib_models_command.js.html#l208"><code>lib&#x2F;models&#x2F;command.js:208</code></a></span>
1567
- <h3 class="">
1568
- private
1569
-
1570
-
1571
- runTask(name, options): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="crosslink external" target="_blank">Promise</a>
1572
- </h3>
1573
- </div>
1574
-
1575
-
1576
-
1577
- <div class="method-description"><p>Looks up for the task and runs
1578
- It also keeps the reference for the current active task
1579
- Keeping reference for the current task allows to cleanup task on interruption</p>
1580
- </div>
1581
-
1582
- <div class="params">
1583
- <h4>Parameters:</h4>
1584
- <table>
1585
- <thead>
1586
- <tr>
1587
- <th>Name</th>
1588
- <th>Type</th>
1589
- <th>Attribute</th>
1590
- <th>Description</th>
1591
- </tr>
1592
- </thead>
1593
- <tbody>
1594
- <tr>
1595
- <td>name</td>
1596
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></td>
1597
- <td>
1598
- <ul>
1599
-
1600
-
1601
-
1602
- </ul>
1603
- </td>
1604
- <td><p>Task name from the tasks registry. Should be capitalized</p>
1605
- </td>
1606
- </tr>
1607
-
1608
- <tr>
1609
- <td>options</td>
1610
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
1611
- <td>
1612
- <ul>
1613
-
1614
-
1615
-
1616
- </ul>
1617
- </td>
1618
- <td> </td>
1619
- </tr>
1620
-
1621
- </tbody>
1622
- </table>
1623
- </div>
1624
-
1625
- <div class="return">
1626
- <h4>Return:</h4>
1627
- <div>
1628
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="crosslink external" target="_blank">Promise</a></span>
1629
- <span class="return-description"><p>Task run</p>
1630
- </span>
1631
- </div>
1632
- </div>
1633
-
1634
- <div class="throws">
1635
- <h4>Throws:</h4>
1636
- <div>
1637
- <span class="throws-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="crosslink external" target="_blank">Error</a></span>
1638
- <span class="throws-description"><p>on attempt to run concurrent task</p>
1639
- </span>
1640
- </div>
1641
- </div>
1642
-
1643
- </div>
1644
- </div>
1645
-
1646
-
1647
- </div>
1648
- </div>
1649
- </div>
1650
- </div>
1651
- <script src="../assets/vendor/prettify/prettify-min.js"></script>
1652
- <script>prettyPrint();</script>
1653
- <script src="../assets/js/yui-prettify.js"></script>
1654
- </body>
1655
- </html>