ember-cli 4.0.0 → 4.1.0-beta.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 (107) hide show
  1. package/.github/workflows/ci.yml +4 -4
  2. package/CHANGELOG.md +17 -2
  3. package/blueprints/app/files/package.json +2 -2
  4. package/docs/build/data.json +3 -3
  5. package/lib/models/host-info-cache.js +3 -5
  6. package/lib/models/per-bundle-addon-cache/index.js +2 -3
  7. package/lib/utilities/get-lang-arg.js +45 -45
  8. package/package.json +25 -25
  9. package/.github/ISSUE_TEMPLATE.md +0 -12
  10. package/.github/dependabot.yml +0 -15
  11. package/.github/workflows/coverage.yml +0 -31
  12. package/docs/analytics.md +0 -44
  13. package/docs/architecture.md +0 -316
  14. package/docs/assets/architecture/Ember-CLI architecture.png +0 -0
  15. package/docs/assets/architecture/Ember-CLI architecture.xml +0 -1
  16. package/docs/assets/architecture/README.md +0 -5
  17. package/docs/brocfile-transition.md +0 -46
  18. package/docs/build/api.js +0 -44
  19. package/docs/build/assets/css/external-small.png +0 -0
  20. package/docs/build/assets/css/logo.png +0 -0
  21. package/docs/build/assets/css/main.css +0 -555
  22. package/docs/build/assets/favicon.ico +0 -0
  23. package/docs/build/assets/img/spinner.gif +0 -0
  24. package/docs/build/assets/index.html +0 -10
  25. package/docs/build/assets/js/api-filter.js +0 -56
  26. package/docs/build/assets/js/api-list.js +0 -255
  27. package/docs/build/assets/js/api-search.js +0 -98
  28. package/docs/build/assets/js/apidocs.js +0 -376
  29. package/docs/build/assets/js/yui-prettify.js +0 -17
  30. package/docs/build/assets/vendor/prettify/CHANGES.html +0 -130
  31. package/docs/build/assets/vendor/prettify/COPYING +0 -202
  32. package/docs/build/assets/vendor/prettify/README.html +0 -203
  33. package/docs/build/assets/vendor/prettify/prettify-min.css +0 -1
  34. package/docs/build/assets/vendor/prettify/prettify-min.js +0 -1
  35. package/docs/build/classes/Addon.html +0 -4318
  36. package/docs/build/classes/AmdTransformAddon.html +0 -202
  37. package/docs/build/classes/Blueprint.html +0 -4796
  38. package/docs/build/classes/Builder.html +0 -611
  39. package/docs/build/classes/CLI.html +0 -810
  40. package/docs/build/classes/Command.html +0 -1655
  41. package/docs/build/classes/DefaultPackager.html +0 -202
  42. package/docs/build/classes/EmberAddon.html +0 -2207
  43. package/docs/build/classes/EmberApp.html +0 -2225
  44. package/docs/build/classes/HardwareInfo.html +0 -620
  45. package/docs/build/classes/HistorySupportAddon.html +0 -203
  46. package/docs/build/classes/Instrumentation.html +0 -695
  47. package/docs/build/classes/NodeModulesList.html +0 -460
  48. package/docs/build/classes/NpmTask.html +0 -333
  49. package/docs/build/classes/PackageInfo.html +0 -1390
  50. package/docs/build/classes/PackageInfoCache.html +0 -963
  51. package/docs/build/classes/PerBundleAddonCache {.html +0 -1010
  52. package/docs/build/classes/Project.html +0 -2083
  53. package/docs/build/classes/ServeFilesAddon.html +0 -260
  54. package/docs/build/classes/TestsServerAddon.html +0 -203
  55. package/docs/build/classes/WatcherAddon.html +0 -204
  56. package/docs/build/classes/WindowsSymlinkChecker.html +0 -1505
  57. package/docs/build/files/lib_broccoli_default-packager.js.html +0 -1426
  58. package/docs/build/files/lib_broccoli_ember-addon.js.html +0 -159
  59. package/docs/build/files/lib_broccoli_ember-app.js.html +0 -1913
  60. package/docs/build/files/lib_cli_cli.js.html +0 -417
  61. package/docs/build/files/lib_models_addon-info.js.html +0 -112
  62. package/docs/build/files/lib_models_addon.js.html +0 -1866
  63. package/docs/build/files/lib_models_blueprint.js.html +0 -1678
  64. package/docs/build/files/lib_models_builder.js.html +0 -417
  65. package/docs/build/files/lib_models_command.js.html +0 -804
  66. package/docs/build/files/lib_models_hardware-info.js.html +0 -479
  67. package/docs/build/files/lib_models_host-info-cache.js.html +0 -428
  68. package/docs/build/files/lib_models_installation-checker.js.html +0 -181
  69. package/docs/build/files/lib_models_instantiate-addons.js.html +0 -191
  70. package/docs/build/files/lib_models_instrumentation.js.html +0 -433
  71. package/docs/build/files/lib_models_package-info-cache_index.js.html +0 -793
  72. package/docs/build/files/lib_models_package-info-cache_node-modules-list.js.html +0 -208
  73. package/docs/build/files/lib_models_package-info-cache_package-info.js.html +0 -661
  74. package/docs/build/files/lib_models_per-bundle-addon-cache_addon-proxy.js.html +0 -252
  75. package/docs/build/files/lib_models_per-bundle-addon-cache_index.js.html +0 -485
  76. package/docs/build/files/lib_models_per-bundle-addon-cache_target-instance.js.html +0 -108
  77. package/docs/build/files/lib_models_project.js.html +0 -913
  78. package/docs/build/files/lib_models_task.js.html +0 -117
  79. package/docs/build/files/lib_tasks_build-watch.js.html +0 -157
  80. package/docs/build/files/lib_tasks_npm-task.js.html +0 -463
  81. package/docs/build/files/lib_tasks_serve.js.html +0 -207
  82. package/docs/build/files/lib_tasks_server_middleware_broccoli-serve-files_index.js.html +0 -127
  83. package/docs/build/files/lib_tasks_server_middleware_broccoli-watcher_index.js.html +0 -158
  84. package/docs/build/files/lib_tasks_server_middleware_history-support_index.js.html +0 -181
  85. package/docs/build/files/lib_tasks_server_middleware_tests-server_index.js.html +0 -171
  86. package/docs/build/files/lib_tasks_test-server.js.html +0 -167
  87. package/docs/build/files/lib_tasks_transforms_amd_index.js.html +0 -143
  88. package/docs/build/files/lib_utilities_ember-app-utils.js.html +0 -292
  89. package/docs/build/files/lib_utilities_insert-into-file.js.html +0 -219
  90. package/docs/build/files/lib_utilities_is-lazy-engine.js.html +0 -125
  91. package/docs/build/files/lib_utilities_is-yarn-project.js.html +0 -120
  92. package/docs/build/files/lib_utilities_valid-project-name.js.html +0 -142
  93. package/docs/build/files/lib_utilities_will-interrupt-process.js.html +0 -290
  94. package/docs/build/files/lib_utilities_windows-admin.js.html +0 -230
  95. package/docs/build/index.html +0 -125
  96. package/docs/build/modules/ember-cli.html +0 -152
  97. package/docs/build/modules/is-lazy-engine.html +0 -106
  98. package/docs/build-concurrency.md +0 -15
  99. package/docs/build-pipeline-debugging.md +0 -33
  100. package/docs/code-coverage.md +0 -14
  101. package/docs/error-propagation.md +0 -136
  102. package/docs/experiments.md +0 -53
  103. package/docs/node-support.md +0 -43
  104. package/docs/perf-guide.md +0 -250
  105. package/docs/project_version_preprocessor.js +0 -8
  106. package/docs/sourcemaps.md +0 -60
  107. package/docs/yuidoc.json +0 -13
@@ -1,4318 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <title>Addon - 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">Addon</h2>
71
- </div>
72
- <div class="bd">
73
-
74
-
75
- <div><a href="#constructor-summary">Constructor Summary</a></div>
76
-
77
- <div><a href="#property-summary">Property Summary</a></div>
78
-
79
- <div><a href="#method-summary">Method Summary</a></div>
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
- <div><a href="#public-constructors">Public Constructors</a></div>
88
- <ul>
89
- <li><a href="#method_Addon">Addon</a></li>
90
- </ul>
91
-
92
-
93
-
94
- <div><a href="#public-properties">Public Properties</a></div>
95
- <ul>
96
- <li><a href="#props_"></a></li>
97
- <li><a href="#props_addons">addons</a></li>
98
- <li><a href="#props_app">app</a></li>
99
- <li><a href="#props_name">name</a></li>
100
- <li><a href="#props_parent">parent</a></li>
101
- <li><a href="#props_pkg">pkg</a></li>
102
- <li><a href="#props_project">project</a></li>
103
- <li><a href="#props_root">root</a></li>
104
- <li><a href="#props_ui">ui</a></li>
105
- </ul>
106
-
107
-
108
-
109
- <div><a href="#public-methods">Public Methods</a></div>
110
- <ul>
111
- <li><a href="#method_blueprintsPath">blueprintsPath</a></li>
112
- <li><a href="#method_buildError">buildError</a></li>
113
- <li><a href="#method_cacheKeyForTree">cacheKeyForTree</a></li>
114
- <li><a href="#method_config">config</a></li>
115
- <li><a href="#method_contentFor">contentFor</a></li>
116
- <li><a href="#method_dependencies">dependencies</a></li>
117
- <li><a href="#method_findOwnAddonByName">findOwnAddonByName</a></li>
118
- <li><a href="#method_hintingEnabled">hintingEnabled</a></li>
119
- <li><a href="#method_import">import</a></li>
120
- <li><a href="#method_importTransforms">importTransforms</a></li>
121
- <li><a href="#method_included">included</a></li>
122
- <li><a href="#method_includedCommands">includedCommands</a></li>
123
- <li><a href="#method_init">init</a></li>
124
- <li><a href="#method_isDevelopingAddon">isDevelopingAddon</a></li>
125
- <li><a href="#method_isEnabled">isEnabled</a></li>
126
- <li><a href="#method_lintTree">lintTree</a></li>
127
- <li><a href="#method_moduleName">moduleName</a></li>
128
- <li><a href="#method_outputReady">outputReady</a></li>
129
- <li><a href="#method_postBuild">postBuild</a></li>
130
- <li><a href="#method_postprocessTree">postprocessTree</a></li>
131
- <li><a href="#method_preBuild">preBuild</a></li>
132
- <li><a href="#method_preprocessTree">preprocessTree</a></li>
133
- <li><a href="#method_serverMiddleware">serverMiddleware</a></li>
134
- <li><a href="#method_setupPreprocessorRegistry">setupPreprocessorRegistry</a></li>
135
- <li><a href="#method_shouldIncludeChildAddon">shouldIncludeChildAddon</a></li>
136
- <li><a href="#method_testemMiddleware">testemMiddleware</a></li>
137
- <li><a href="#method_treeFor">treeFor</a></li>
138
- <li><a href="#method_treeForAddon">treeForAddon</a></li>
139
- <li><a href="#method_treeForAddonTemplates">treeForAddonTemplates</a></li>
140
- <li><a href="#method_treeForAddonTestSupport">treeForAddonTestSupport</a></li>
141
- <li><a href="#method_treeForApp">treeForApp</a></li>
142
- <li><a href="#method_treeForPublic">treeForPublic</a></li>
143
- <li><a href="#method_treeForStyles">treeForStyles</a></li>
144
- <li><a href="#method_treeForTemplates">treeForTemplates</a></li>
145
- <li><a href="#method_treeForTestSupport">treeForTestSupport</a></li>
146
- <li><a href="#method_treeForVendor">treeForVendor</a></li>
147
- </ul>
148
-
149
-
150
- <div><a href="#private-methods">Private Methods</a></div>
151
- <ul>
152
- <li><a href="#method__eachProjectAddonInvoke">_eachProjectAddonInvoke</a></li>
153
- <li><a href="#method__findHost">_findHost</a></li>
154
- <li><a href="#method__shouldCompilePodTemplates">_shouldCompilePodTemplates</a></li>
155
- <li><a href="#method__treeFor">_treeFor</a></li>
156
- <li><a href="#method__warn">_warn</a></li>
157
- <li><a href="#method_addonJsFiles">addonJsFiles</a></li>
158
- <li><a href="#method_compileAddon">compileAddon</a></li>
159
- <li><a href="#method_compileStyles">compileStyles</a></li>
160
- <li><a href="#method_compileTemplates">compileTemplates</a></li>
161
- <li><a href="#method_concatFiles">concatFiles</a></li>
162
- <li><a href="#method_discoverAddons">discoverAddons</a></li>
163
- <li><a href="#method_eachAddonInvoke">eachAddonInvoke</a></li>
164
- <li><a href="#method_jshintAddonTree">jshintAddonTree</a></li>
165
- <li><a href="#method_preprocessJs">preprocessJs</a></li>
166
- <li><a href="#method_processedAddonJsFiles">processedAddonJsFiles</a></li>
167
- <li><a href="#method_shouldCompileTemplates">shouldCompileTemplates</a></li>
168
- <li><a href="#method_treeGenerator">treeGenerator</a></li>
169
- </ul>
170
- </div>
171
- </div>
172
-
173
-
174
-
175
- <div class="version-info">
176
- Version: 4.0.0-release-b4cbb1029f
177
- </div>
178
-
179
- </div>
180
-
181
- <div id="main" class="yui3-u">
182
- <div class="content"><div class="title">
183
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l137"><code>lib&#x2F;models&#x2F;addon.js:137</code></a></span>
184
- <h1 class="class-name">Addon</h1>
185
- </div>
186
-
187
-
188
-
189
- <div class="class-extends">
190
- <h4>Extends:</h4>
191
- <div>CoreObject → Addon</div>
192
- </div>
193
-
194
- <div class="class-description"><p>Root class for an Addon. If your addon module exports an Object this
195
- will be extended from this base class. If you export a constructor (function),
196
- it will <strong>not</strong> extend from this class.</p>
197
- <p>Hooks:</p>
198
- <ul>
199
- <li><a href="../classes/Addon.html#method_config" class="crosslink">config</a></li>
200
- <li><a href="../classes/Addon.html#method_blueprintsPath" class="crosslink">blueprintsPath</a></li>
201
- <li><a href="../classes/Addon.html#method_includedCommands" class="crosslink">includedCommands</a></li>
202
- <li><a href="../classes/Addon.html#method_importTransforms" class="crosslink">importTransforms</a></li>
203
- <li><a href="../classes/Addon.html#method_serverMiddleware" class="crosslink">serverMiddleware</a></li>
204
- <li><a href="../classes/Addon.html#method_testemMiddleware" class="crosslink">testemMiddleware</a></li>
205
- <li><a href="../classes/Addon.html#method_postBuild" class="crosslink">postBuild</a></li>
206
- <li><a href="../classes/Addon.html#method_preBuild" class="crosslink">preBuild</a></li>
207
- <li><a href="../classes/Addon.html#method_outputReady" class="crosslink">outputReady</a></li>
208
- <li><a href="../classes/Addon.html#method_buildError" class="crosslink">buildError</a></li>
209
- <li><a href="../classes/Addon.html#method_included" class="crosslink">included</a></li>
210
- <li><a href="../classes/Addon.html#method_shouldIncludeChildAddon" class="crosslink">shouldIncludeChildAddon</a></li>
211
- <li><a href="../classes/Addon.html#method_setupPreprocessorRegistry" class="crosslink">setupPreprocessorRegistry</a></li>
212
- <li><a href="../classes/Addon.html#method_preprocessTree" class="crosslink">preprocessTree</a></li>
213
- <li><a href="../classes/Addon.html#method_postprocessTree" class="crosslink">postprocessTree</a></li>
214
- <li><a href="../classes/Addon.html#method_lintTree" class="crosslink">lintTree</a></li>
215
- <li><a href="../classes/Addon.html#method_contentFor" class="crosslink">contentFor</a></li>
216
- <li><a href="../classes/Addon.html#method_treeFor" class="crosslink">treeFor</a></li>
217
- </ul>
218
- </div>
219
-
220
-
221
-
222
-
223
- <h2 id="constructor-summary">Constructor Summary</h2>
224
-
225
- <table class="summary">
226
- <thead>
227
- <tr>
228
- <th colspan="2">Public Constructors</th>
229
- </tr>
230
- </thead>
231
- <tbody>
232
- <tr>
233
- <td>
234
- public
235
-
236
-
237
- </td>
238
- <td>
239
- <div class="method-name ">
240
- <a href="#method_Addon">Addon</a>(parent, project)
241
- </div>
242
- <div class="short-description">
243
- <p>Root class for an Addon. If your addon module exports an Object this will be extended from this base class. If you export a constructor (function), it will <strong>not</strong> extend from this class.</p>
244
- </div>
245
- </td>
246
- </tr>
247
- </tbody>
248
- </table>
249
-
250
-
251
-
252
-
253
-
254
- <h2 id="property-summary">Property Summary</h2>
255
-
256
- <table class="summary">
257
- <thead>
258
- <tr>
259
- <th colspan="2">Public Properties</th>
260
- </tr>
261
- </thead>
262
- <tbody>
263
- <tr>
264
- <td>
265
- public
266
-
267
- final
268
- </td>
269
- <td>
270
- <div class="property-name ">
271
- <a href="#props_"></a>: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol" class="crosslink external" target="_blank">Symbol</a>
272
- </div>
273
- <div class="short-description">
274
- <p>A Symbol constant for sharing between index.js and addon-proxy.js rather than putting the symbol into the Symbol global cache. The symbol is used in per-bundle cache entries to refer to the field that points at the real instance that a Proxy refers to.</p>
275
- </div>
276
- </td>
277
- </tr>
278
- <tr>
279
- <td>
280
- public
281
-
282
- final
283
- </td>
284
- <td>
285
- <div class="property-name ">
286
- <a href="#props_addons">addons</a>: <a href="../classes/Addon.html" class="crosslink">Addon[]</a>
287
- </div>
288
- <div class="short-description">
289
- <p>The set of addons that this addon itself depends on.</p>
290
- </div>
291
- </td>
292
- </tr>
293
- <tr>
294
- <td>
295
- public
296
-
297
- final
298
- </td>
299
- <td>
300
- <div class="property-name ">
301
- <a href="#props_app">app</a>: <a href="../classes/EmberApp.html" class="crosslink">EmberApp</a>
302
- </div>
303
- <div class="short-description">
304
- <p>The host app instance.</p>
305
- </div>
306
- </td>
307
- </tr>
308
- <tr>
309
- <td>
310
- public
311
-
312
- final
313
- </td>
314
- <td>
315
- <div class="property-name ">
316
- <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>
317
- </div>
318
- <div class="short-description">
319
- <p>The name of this addon.</p>
320
- </div>
321
- </td>
322
- </tr>
323
- <tr>
324
- <td>
325
- public
326
-
327
- final
328
- </td>
329
- <td>
330
- <div class="property-name ">
331
- <a href="#props_parent">parent</a>: <a href="../classes/Project.html" class="crosslink">Project</a> | <a href="../classes/Addon.html" class="crosslink">Addon</a>
332
- </div>
333
- <div class="short-description">
334
- <p>This addon's parent.</p>
335
- </div>
336
- </td>
337
- </tr>
338
- <tr>
339
- <td>
340
- public
341
-
342
- final
343
- </td>
344
- <td>
345
- <div class="property-name ">
346
- <a href="#props_pkg">pkg</a>: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>
347
- </div>
348
- <div class="short-description">
349
- <p>The contents of the addon's <code>package.json</code>.</p>
350
- </div>
351
- </td>
352
- </tr>
353
- <tr>
354
- <td>
355
- public
356
-
357
- final
358
- </td>
359
- <td>
360
- <div class="property-name ">
361
- <a href="#props_project">project</a>: <a href="../classes/Project.html" class="crosslink">Project</a>
362
- </div>
363
- <div class="short-description">
364
- <p>The root <a href="../classes/Project.html" class="crosslink">project</a> to which this addon belongs.</p>
365
- </div>
366
- </td>
367
- </tr>
368
- <tr>
369
- <td>
370
- public
371
-
372
- final
373
- </td>
374
- <td>
375
- <div class="property-name ">
376
- <a href="#props_root">root</a>: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>
377
- </div>
378
- <div class="short-description">
379
- <p>The absolute path of the root directory where this addon is located.</p>
380
- </div>
381
- </td>
382
- </tr>
383
- <tr>
384
- <td>
385
- public
386
-
387
- final
388
- </td>
389
- <td>
390
- <div class="property-name ">
391
- <a href="#props_ui">ui</a>: UI
392
- </div>
393
- <div class="short-description">
394
- <p>A <a href="https://github.com/ember-cli/console-ui"><code>console-ui</code></a> object that can be used to log messages for the user and indicate progress on long-running operations.</p>
395
- </div>
396
- </td>
397
- </tr>
398
- </tbody>
399
- </table>
400
-
401
-
402
-
403
- <h2 id="method-summary">Method Summary</h2>
404
-
405
- <table class="summary">
406
- <thead>
407
- <tr>
408
- <th colspan="2">Public Methods</th>
409
- </tr>
410
- </thead>
411
- <tbody>
412
- <tr>
413
- <td>
414
- public
415
-
416
-
417
- </td>
418
- <td>
419
- <div class="method-name ">
420
- <a href="#method_blueprintsPath">blueprintsPath</a>( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>
421
- </div>
422
- <div class="short-description">
423
- <p>Returns the path for addon blueprints.</p>
424
- </div>
425
- </td>
426
- </tr>
427
- <tr>
428
- <td>
429
- public
430
-
431
-
432
- </td>
433
- <td>
434
- <div class="method-name ">
435
- <a href="#method_buildError">buildError</a>(error)
436
- </div>
437
- <div class="short-description">
438
- <p>This hook is called when an error occurs during the preBuild, postBuild or outputReady hooks for addons, or when the build fails</p>
439
- </div>
440
- </td>
441
- </tr>
442
- <tr>
443
- <td>
444
- public
445
-
446
-
447
- </td>
448
- <td>
449
- <div class="method-name ">
450
- <a href="#method_cacheKeyForTree">cacheKeyForTree</a>(treeType): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>
451
- </div>
452
- <div class="short-description">
453
- <p>Calculates a cacheKey for the given treeType. It is expected to return a cache key allowing multiple builds of the same tree to simply return the original tree (preventing duplicate work). If it returns null / undefined the tree in question will opt out of this caching system.</p>
454
- </div>
455
- </td>
456
- </tr>
457
- <tr>
458
- <td>
459
- public
460
-
461
-
462
- </td>
463
- <td>
464
- <div class="method-name ">
465
- <a href="#method_config">config</a>(env, baseConfig): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>
466
- </div>
467
- <div class="short-description">
468
- <p>Augments the application's configuration settings.</p>
469
- </div>
470
- </td>
471
- </tr>
472
- <tr>
473
- <td>
474
- public
475
-
476
-
477
- </td>
478
- <td>
479
- <div class="method-name ">
480
- <a href="#method_contentFor">contentFor</a>(type, config, content)
481
- </div>
482
- <div class="short-description">
483
- <p>Allow addons to implement contentFor method to add string output into the associated <code>{{content-for 'foo'}}</code> section in <code>index.html</code></p>
484
- </div>
485
- </td>
486
- </tr>
487
- <tr>
488
- <td>
489
- public
490
-
491
-
492
- </td>
493
- <td>
494
- <div class="method-name ">
495
- <a href="#method_dependencies">dependencies</a>( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>
496
- </div>
497
- <div class="short-description">
498
-
499
- </div>
500
- </td>
501
- </tr>
502
- <tr>
503
- <td>
504
- public
505
-
506
-
507
- </td>
508
- <td>
509
- <div class="method-name ">
510
- <a href="#method_findOwnAddonByName">findOwnAddonByName</a>( )
511
- </div>
512
- <div class="short-description">
513
- <p>Find an addon of the current addon.</p>
514
- </div>
515
- </td>
516
- </tr>
517
- <tr>
518
- <td>
519
- public
520
-
521
-
522
- </td>
523
- <td>
524
- <div class="method-name ">
525
- <a href="#method_hintingEnabled">hintingEnabled</a>( )
526
- </div>
527
- <div class="short-description">
528
- <p>Check if the current addon intends to be hinted. Typically this is for hinting/linting libraries such as eslint or jshint</p>
529
- </div>
530
- </td>
531
- </tr>
532
- <tr>
533
- <td>
534
- public
535
-
536
-
537
- </td>
538
- <td>
539
- <div class="method-name ">
540
- <a href="#method_import">import</a>(asset, [options])
541
- </div>
542
- <div class="short-description">
543
- <p>Imports an asset into this addon.</p>
544
- </div>
545
- </td>
546
- </tr>
547
- <tr>
548
- <td>
549
- public
550
-
551
-
552
- </td>
553
- <td>
554
- <div class="method-name ">
555
- <a href="#method_importTransforms">importTransforms</a>( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>
556
- </div>
557
- <div class="short-description">
558
- <p>Allows addons to define a custom transform function that other addons and app can use when using <code>app.import</code>.</p>
559
- </div>
560
- </td>
561
- </tr>
562
- <tr>
563
- <td>
564
- public
565
-
566
-
567
- </td>
568
- <td>
569
- <div class="method-name ">
570
- <a href="#method_included">included</a>(parent)
571
- </div>
572
- <div class="short-description">
573
- <p>This method is called when the addon is included in a build. You would typically use this hook to perform additional imports</p>
574
- </div>
575
- </td>
576
- </tr>
577
- <tr>
578
- <td>
579
- public
580
-
581
-
582
- </td>
583
- <td>
584
- <div class="method-name ">
585
- <a href="#method_includedCommands">includedCommands</a>( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>
586
- </div>
587
- <div class="short-description">
588
- <p>Allows the specification of custom addon commands. Expects you to return an object whose key is the name of the command and value is the command instance..</p>
589
- </div>
590
- </td>
591
- </tr>
592
- <tr>
593
- <td>
594
- public
595
-
596
-
597
- </td>
598
- <td>
599
- <div class="method-name ">
600
- <a href="#method_init">init</a>(parent, project)
601
- </div>
602
- <div class="short-description">
603
- <p>Initializes the addon. If you override this method make sure and call <code>this._super.init &amp;&amp; this._super.init.apply(this, arguments);</code> or your addon will not work.</p>
604
- </div>
605
- </td>
606
- </tr>
607
- <tr>
608
- <td>
609
- public
610
-
611
-
612
- </td>
613
- <td>
614
- <div class="method-name ">
615
- <a href="#method_isDevelopingAddon">isDevelopingAddon</a>( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
616
- </div>
617
- <div class="short-description">
618
- <p>Allows to mark the addon as developing, triggering live-reload in the project the addon is linked to.</p>
619
- </div>
620
- </td>
621
- </tr>
622
- <tr>
623
- <td>
624
- public
625
-
626
-
627
- </td>
628
- <td>
629
- <div class="method-name ">
630
- <a href="#method_isEnabled">isEnabled</a>( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
631
- </div>
632
- <div class="short-description">
633
-
634
- </div>
635
- </td>
636
- </tr>
637
- <tr>
638
- <td>
639
- public
640
-
641
-
642
- </td>
643
- <td>
644
- <div class="method-name ">
645
- <a href="#method_lintTree">lintTree</a>(treeType, tree)
646
- </div>
647
- <div class="short-description">
648
- <p>Return value is merged into the <strong>tests</strong> tree. This lets you inject linter output as test results.</p>
649
- </div>
650
- </td>
651
- </tr>
652
- <tr>
653
- <td>
654
- public
655
-
656
-
657
- </td>
658
- <td>
659
- <div class="method-name ">
660
- <a href="#method_moduleName">moduleName</a>( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>
661
- </div>
662
- <div class="short-description">
663
- <p>Returns the module name for this addon.</p>
664
- </div>
665
- </td>
666
- </tr>
667
- <tr>
668
- <td>
669
- public
670
-
671
-
672
- </td>
673
- <td>
674
- <div class="method-name ">
675
- <a href="#method_outputReady">outputReady</a>(result)
676
- </div>
677
- <div class="short-description">
678
- <p>This hook is called after the build has been processed and the build files have been copied to the output directory</p>
679
- </div>
680
- </td>
681
- </tr>
682
- <tr>
683
- <td>
684
- public
685
-
686
-
687
- </td>
688
- <td>
689
- <div class="method-name ">
690
- <a href="#method_postBuild">postBuild</a>(result)
691
- </div>
692
- <div class="short-description">
693
- <p>This hook is called after a build is complete.</p>
694
- </div>
695
- </td>
696
- </tr>
697
- <tr>
698
- <td>
699
- public
700
-
701
-
702
- </td>
703
- <td>
704
- <div class="method-name ">
705
- <a href="#method_postprocessTree">postprocessTree</a>(type, tree): Tree
706
- </div>
707
- <div class="short-description">
708
- <p>Post-process a tree</p>
709
- </div>
710
- </td>
711
- </tr>
712
- <tr>
713
- <td>
714
- public
715
-
716
-
717
- </td>
718
- <td>
719
- <div class="method-name ">
720
- <a href="#method_preBuild">preBuild</a>(result)
721
- </div>
722
- <div class="short-description">
723
- <p>This hook is called before a build takes place.</p>
724
- </div>
725
- </td>
726
- </tr>
727
- <tr>
728
- <td>
729
- public
730
-
731
-
732
- </td>
733
- <td>
734
- <div class="method-name ">
735
- <a href="#method_preprocessTree">preprocessTree</a>(type, tree): Tree
736
- </div>
737
- <div class="short-description">
738
- <p>Pre-process a tree</p>
739
- </div>
740
- </td>
741
- </tr>
742
- <tr>
743
- <td>
744
- public
745
-
746
-
747
- </td>
748
- <td>
749
- <div class="method-name ">
750
- <a href="#method_serverMiddleware">serverMiddleware</a>(startOptions)
751
- </div>
752
- <div class="short-description">
753
- <p>This hook allows you to make changes to the express server run by ember-cli.</p>
754
- </div>
755
- </td>
756
- </tr>
757
- <tr>
758
- <td>
759
- public
760
-
761
-
762
- </td>
763
- <td>
764
- <div class="method-name ">
765
- <a href="#method_setupPreprocessorRegistry">setupPreprocessorRegistry</a>(type, registry)
766
- </div>
767
- <div class="short-description">
768
- <p>Used to add preprocessors to the preprocessor registry. This is often used by addons like <a href="https://github.com/ember-cli/ember-cli-htmlbars">ember-cli-htmlbars</a> and <a href="https://github.com/kimroen/ember-cli-coffeescript">ember-cli-coffeescript</a> to add a <code>template</code> or <code>js</code> preprocessor to the registry.</p>
769
- </div>
770
- </td>
771
- </tr>
772
- <tr>
773
- <td>
774
- public
775
-
776
-
777
- </td>
778
- <td>
779
- <div class="method-name ">
780
- <a href="#method_shouldIncludeChildAddon">shouldIncludeChildAddon</a>(childAddon): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
781
- </div>
782
- <div class="short-description">
783
- <p>Can be used to exclude addons from being added as a child addon.</p>
784
- </div>
785
- </td>
786
- </tr>
787
- <tr>
788
- <td>
789
- public
790
-
791
-
792
- </td>
793
- <td>
794
- <div class="method-name ">
795
- <a href="#method_testemMiddleware">testemMiddleware</a>(app)
796
- </div>
797
- <div class="short-description">
798
- <p>This hook allows you to make changes to the express server run by testem.</p>
799
- </div>
800
- </td>
801
- </tr>
802
- <tr>
803
- <td>
804
- public
805
-
806
-
807
- </td>
808
- <td>
809
- <div class="method-name ">
810
- <a href="#method_treeFor">treeFor</a>(name): Tree
811
- </div>
812
- <div class="short-description">
813
- <p>Returns a given type of tree (if present), merged with the application tree. For each of the trees available using this method, you can also use a direct method called <code>treeFor[Type]</code> (eg. <code>treeForApp</code>).</p>
814
- </div>
815
- </td>
816
- </tr>
817
- <tr>
818
- <td>
819
- public
820
-
821
-
822
- </td>
823
- <td>
824
- <div class="method-name ">
825
- <a href="#method_treeForAddon">treeForAddon</a>(tree): Tree
826
- </div>
827
- <div class="short-description">
828
- <p>Returns a tree for this addon</p>
829
- </div>
830
- </td>
831
- </tr>
832
- <tr>
833
- <td>
834
- public
835
-
836
-
837
- </td>
838
- <td>
839
- <div class="method-name ">
840
- <a href="#method_treeForAddonTemplates">treeForAddonTemplates</a>(tree): Tree
841
- </div>
842
- <div class="short-description">
843
- <p>Returns the tree for this addon's templates</p>
844
- </div>
845
- </td>
846
- </tr>
847
- <tr>
848
- <td>
849
- public
850
-
851
-
852
- </td>
853
- <td>
854
- <div class="method-name ">
855
- <a href="#method_treeForAddonTestSupport">treeForAddonTestSupport</a>(tree): Tree
856
- </div>
857
- <div class="short-description">
858
- <p>Returns the tree for all test files namespaced to a given addon.</p>
859
- </div>
860
- </td>
861
- </tr>
862
- <tr>
863
- <td>
864
- public
865
-
866
-
867
- </td>
868
- <td>
869
- <div class="method-name ">
870
- <a href="#method_treeForApp">treeForApp</a>(tree): Tree
871
- </div>
872
- <div class="short-description">
873
- <p>Returns the tree for all app files</p>
874
- </div>
875
- </td>
876
- </tr>
877
- <tr>
878
- <td>
879
- public
880
-
881
-
882
- </td>
883
- <td>
884
- <div class="method-name ">
885
- <a href="#method_treeForPublic">treeForPublic</a>(tree): Tree
886
- </div>
887
- <div class="short-description">
888
- <p>Returns the tree for all public files</p>
889
- </div>
890
- </td>
891
- </tr>
892
- <tr>
893
- <td>
894
- public
895
-
896
-
897
- </td>
898
- <td>
899
- <div class="method-name ">
900
- <a href="#method_treeForStyles">treeForStyles</a>(tree): Tree
901
- </div>
902
- <div class="short-description">
903
- <p>Returns the tree for all style files</p>
904
- </div>
905
- </td>
906
- </tr>
907
- <tr>
908
- <td>
909
- public
910
-
911
-
912
- </td>
913
- <td>
914
- <div class="method-name ">
915
- <a href="#method_treeForTemplates">treeForTemplates</a>(tree): Tree
916
- </div>
917
- <div class="short-description">
918
- <p>Returns the tree for all template files</p>
919
- </div>
920
- </td>
921
- </tr>
922
- <tr>
923
- <td>
924
- public
925
-
926
-
927
- </td>
928
- <td>
929
- <div class="method-name ">
930
- <a href="#method_treeForTestSupport">treeForTestSupport</a>(tree): Tree
931
- </div>
932
- <div class="short-description">
933
- <p>Returns the tree for all test support files</p>
934
- </div>
935
- </td>
936
- </tr>
937
- <tr>
938
- <td>
939
- public
940
-
941
-
942
- </td>
943
- <td>
944
- <div class="method-name ">
945
- <a href="#method_treeForVendor">treeForVendor</a>(tree): Tree
946
- </div>
947
- <div class="short-description">
948
- <p>Returns the tree for all vendor files</p>
949
- </div>
950
- </td>
951
- </tr>
952
- </tbody>
953
- </table>
954
-
955
-
956
- <table class="summary">
957
- <thead>
958
- <tr>
959
- <th colspan="2">Private Methods</th>
960
- </tr>
961
- </thead>
962
- <tbody>
963
- <tr>
964
- <td>
965
- private
966
-
967
-
968
- </td>
969
- <td>
970
- <div class="method-name ">
971
- <a href="#method__eachProjectAddonInvoke">_eachProjectAddonInvoke</a>(methodName, args)
972
- </div>
973
- <div class="short-description">
974
- <p>Invoke the specified method for each of the project's addons.</p>
975
- </div>
976
- </td>
977
- </tr>
978
- <tr>
979
- <td>
980
- private
981
-
982
-
983
- </td>
984
- <td>
985
- <div class="method-name ">
986
- <a href="#method__findHost">_findHost</a>( )
987
- </div>
988
- <div class="short-description">
989
- <p>This method climbs up the hierarchy of addons up to the host application.</p>
990
- </div>
991
- </td>
992
- </tr>
993
- <tr>
994
- <td>
995
- private
996
-
997
-
998
- </td>
999
- <td>
1000
- <div class="method-name ">
1001
- <a href="#method__shouldCompilePodTemplates">_shouldCompilePodTemplates</a>( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
1002
- </div>
1003
- <div class="short-description">
1004
- <p>Looks in the addon/ and addon/templates trees to determine if template files exist in the pods format that need to be precompiled.</p>
1005
- </div>
1006
- </td>
1007
- </tr>
1008
- <tr>
1009
- <td>
1010
- private
1011
-
1012
-
1013
- </td>
1014
- <td>
1015
- <div class="method-name ">
1016
- <a href="#method__treeFor">_treeFor</a>(name): Tree
1017
- </div>
1018
- <div class="short-description">
1019
-
1020
- </div>
1021
- </td>
1022
- </tr>
1023
- <tr>
1024
- <td>
1025
- private
1026
-
1027
-
1028
- </td>
1029
- <td>
1030
- <div class="method-name ">
1031
- <a href="#method__warn">_warn</a>( )
1032
- </div>
1033
- <div class="short-description">
1034
-
1035
- </div>
1036
- </td>
1037
- </tr>
1038
- <tr>
1039
- <td>
1040
- private
1041
-
1042
-
1043
- </td>
1044
- <td>
1045
- <div class="method-name deprecated">
1046
- <a href="#method_addonJsFiles">addonJsFiles</a>( ): Tree
1047
- </div>
1048
- <div class="short-description">
1049
- <p>Returns a tree containing the addon's js files</p>
1050
- </div>
1051
- </td>
1052
- </tr>
1053
- <tr>
1054
- <td>
1055
- private
1056
-
1057
-
1058
- </td>
1059
- <td>
1060
- <div class="method-name ">
1061
- <a href="#method_compileAddon">compileAddon</a>(tree): Tree
1062
- </div>
1063
- <div class="short-description">
1064
- <p>Runs the addon tree through preprocessors.</p>
1065
- </div>
1066
- </td>
1067
- </tr>
1068
- <tr>
1069
- <td>
1070
- private
1071
-
1072
-
1073
- </td>
1074
- <td>
1075
- <div class="method-name ">
1076
- <a href="#method_compileStyles">compileStyles</a>(addonStylesTree): Tree
1077
- </div>
1078
- <div class="short-description">
1079
- <p>Runs the styles tree through preprocessors.</p>
1080
- </div>
1081
- </td>
1082
- </tr>
1083
- <tr>
1084
- <td>
1085
- private
1086
-
1087
-
1088
- </td>
1089
- <td>
1090
- <div class="method-name ">
1091
- <a href="#method_compileTemplates">compileTemplates</a>(tree): Tree
1092
- </div>
1093
- <div class="short-description">
1094
- <p>Runs the templates tree through preprocessors.</p>
1095
- </div>
1096
- </td>
1097
- </tr>
1098
- <tr>
1099
- <td>
1100
- private
1101
-
1102
-
1103
- </td>
1104
- <td>
1105
- <div class="method-name ">
1106
- <a href="#method_concatFiles">concatFiles</a>(tree, options): Tree
1107
- </div>
1108
- <div class="short-description">
1109
- <p>Shorthand method for <a href="https://github.com/ember-cli/broccoli-concat">broccoli-concat</a></p>
1110
- </div>
1111
- </td>
1112
- </tr>
1113
- <tr>
1114
- <td>
1115
- private
1116
-
1117
-
1118
- </td>
1119
- <td>
1120
- <div class="method-name ">
1121
- <a href="#method_discoverAddons">discoverAddons</a>( )
1122
- </div>
1123
- <div class="short-description">
1124
- <p>Discovers all child addons of this addon and an AddonInfo about each addon in this.addonPackages (keyed on addon name).</p>
1125
- </div>
1126
- </td>
1127
- </tr>
1128
- <tr>
1129
- <td>
1130
- private
1131
-
1132
-
1133
- </td>
1134
- <td>
1135
- <div class="method-name ">
1136
- <a href="#method_eachAddonInvoke">eachAddonInvoke</a>(methodName, args)
1137
- </div>
1138
- <div class="short-description">
1139
- <p>Invoke the specified method for each enabled addon.</p>
1140
- </div>
1141
- </td>
1142
- </tr>
1143
- <tr>
1144
- <td>
1145
- private
1146
-
1147
-
1148
- </td>
1149
- <td>
1150
- <div class="method-name ">
1151
- <a href="#method_jshintAddonTree">jshintAddonTree</a>( ): Tree
1152
- </div>
1153
- <div class="short-description">
1154
- <p>Returns a tree with JSHint output for all addon JS.</p>
1155
- </div>
1156
- </td>
1157
- </tr>
1158
- <tr>
1159
- <td>
1160
- private
1161
-
1162
-
1163
- </td>
1164
- <td>
1165
- <div class="method-name ">
1166
- <a href="#method_preprocessJs">preprocessJs</a>( ): Tree
1167
- </div>
1168
- <div class="short-description">
1169
- <p>Preprocesses a javascript tree.</p>
1170
- </div>
1171
- </td>
1172
- </tr>
1173
- <tr>
1174
- <td>
1175
- private
1176
-
1177
-
1178
- </td>
1179
- <td>
1180
- <div class="method-name ">
1181
- <a href="#method_processedAddonJsFiles">processedAddonJsFiles</a>(the): Tree
1182
- </div>
1183
- <div class="short-description">
1184
- <p>Returns a tree with all javascript for this addon.</p>
1185
- </div>
1186
- </td>
1187
- </tr>
1188
- <tr>
1189
- <td>
1190
- private
1191
-
1192
-
1193
- </td>
1194
- <td>
1195
- <div class="method-name ">
1196
- <a href="#method_shouldCompileTemplates">shouldCompileTemplates</a>( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
1197
- </div>
1198
- <div class="short-description">
1199
- <p>Looks in the addon/ and addon/templates trees to determine if template files exist that need to be precompiled.</p>
1200
- </div>
1201
- </td>
1202
- </tr>
1203
- <tr>
1204
- <td>
1205
- private
1206
-
1207
-
1208
- </td>
1209
- <td>
1210
- <div class="method-name ">
1211
- <a href="#method_treeGenerator">treeGenerator</a>( ): Tree
1212
- </div>
1213
- <div class="short-description">
1214
- <p>Generates a tree for the specified path</p>
1215
- </div>
1216
- </td>
1217
- </tr>
1218
- </tbody>
1219
- </table>
1220
-
1221
-
1222
-
1223
-
1224
-
1225
-
1226
-
1227
- <div id="methods public">
1228
- <h2 id="public-constructors">Public Constructors</h2>
1229
- <div class="method item">
1230
- <div id="method_Addon" class="title">
1231
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l137"><code>lib&#x2F;models&#x2F;addon.js:137</code></a></span>
1232
- <h3 class="">
1233
- public
1234
-
1235
-
1236
- Addon(parent, project)
1237
- </h3>
1238
- </div>
1239
-
1240
-
1241
-
1242
- <div class="method-description"></div>
1243
-
1244
- <div class="params">
1245
- <h4>Parameters:</h4>
1246
- <table>
1247
- <thead>
1248
- <tr>
1249
- <th>Name</th>
1250
- <th>Type</th>
1251
- <th>Attribute</th>
1252
- <th>Description</th>
1253
- </tr>
1254
- </thead>
1255
- <tbody>
1256
- <tr>
1257
- <td>parent</td>
1258
- <td><a href="../classes/Project.html" class="crosslink">Project</a> | <a href="../classes/Addon.html" class="crosslink">Addon</a></td>
1259
- <td>
1260
- <ul>
1261
-
1262
-
1263
-
1264
- </ul>
1265
- </td>
1266
- <td><p>The project or addon that directly depends on this addon</p>
1267
- </td>
1268
- </tr>
1269
-
1270
- <tr>
1271
- <td>project</td>
1272
- <td><a href="../classes/Project.html" class="crosslink">Project</a></td>
1273
- <td>
1274
- <ul>
1275
-
1276
-
1277
-
1278
- </ul>
1279
- </td>
1280
- <td><p>The current project (deprecated)</p>
1281
- </td>
1282
- </tr>
1283
-
1284
- </tbody>
1285
- </table>
1286
- </div>
1287
-
1288
-
1289
-
1290
- </div>
1291
- </div>
1292
-
1293
-
1294
-
1295
- <div id="properties public">
1296
- <h2 id="public-properties">Public Properties</h2>
1297
- <div class="property item">
1298
- <div id="props_" class="title">
1299
- <span class="source-link"><a href="../files/lib_models_per-bundle-addon-cache_target-instance.js.html#l3"><code>lib&#x2F;models&#x2F;per-bundle-addon-cache&#x2F;target-instance.js:3</code></a></span>
1300
- <h3 class="">
1301
- public
1302
-
1303
- final
1304
- : <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol" class="crosslink external" target="_blank">Symbol</a>
1305
- </h3>
1306
- </div>
1307
-
1308
-
1309
- <div class="property-description"><p>A Symbol constant for sharing between index.js and addon-proxy.js rather than
1310
- putting the symbol into the Symbol global cache. The symbol is used in per-bundle
1311
- cache entries to refer to the field that points at the real instance that a Proxy
1312
- refers to.</p>
1313
- </div>
1314
-
1315
- </div>
1316
- <div class="property item public">
1317
- <div id="props_addons" class="title">
1318
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l223"><code>lib&#x2F;models&#x2F;addon.js:223</code></a></span>
1319
- <h3 class="">
1320
- public
1321
-
1322
- final
1323
- addons: <a href="../classes/Addon.html" class="crosslink">Addon[]</a>
1324
- </h3>
1325
- </div>
1326
-
1327
-
1328
- <div class="property-description"><p>The set of addons that this addon itself depends on.</p>
1329
- <p>This array is populated from the addon's listed <code>dependencies</code> and any items in
1330
- <code>ember-addon.paths</code> in its <code>package.json</code>.</p>
1331
- </div>
1332
-
1333
- </div>
1334
- <div class="property item public">
1335
- <div id="props_app" class="title">
1336
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l188"><code>lib&#x2F;models&#x2F;addon.js:188</code></a></span>
1337
- <h3 class="">
1338
- public
1339
-
1340
- final
1341
- app: <a href="../classes/EmberApp.html" class="crosslink">EmberApp</a>
1342
- </h3>
1343
- </div>
1344
-
1345
-
1346
- <div class="property-description"><p>The host app instance.</p>
1347
- <p><strong>Note</strong>: this property will only be present on addons that are a direct dependency
1348
- of the application itself, not of other addons. It is also not available in <code>init()</code>,
1349
- but will be set before <code>setupPreprocessorRegistry()</code> and <code>included()</code> are invoked.</p>
1350
- </div>
1351
-
1352
- </div>
1353
- <div class="property item public">
1354
- <div id="props_name" class="title">
1355
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l170"><code>lib&#x2F;models&#x2F;addon.js:170</code></a></span>
1356
- <h3 class="">
1357
- public
1358
-
1359
- final
1360
- name: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>
1361
- </h3>
1362
- </div>
1363
-
1364
-
1365
- <div class="property-description"><p>The name of this addon.</p>
1366
- </div>
1367
-
1368
- </div>
1369
- <div class="property item public">
1370
- <div id="props_parent" class="title">
1371
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l210"><code>lib&#x2F;models&#x2F;addon.js:210</code></a></span>
1372
- <h3 class="">
1373
- public
1374
-
1375
- final
1376
- parent: <a href="../classes/Project.html" class="crosslink">Project</a> | <a href="../classes/Addon.html" class="crosslink">Addon</a>
1377
- </h3>
1378
- </div>
1379
-
1380
-
1381
- <div class="property-description"><p>This addon's parent.</p>
1382
- <p>If the addon is a direct dependency of an application, then <code>parent</code> will be the
1383
- corresponding <a href="../classes/Project.html" class="crosslink">project</a> instance. If it's a
1384
- dependency of another addon, then <code>parent</code> will be a reference to that addon.</p>
1385
- </div>
1386
-
1387
- </div>
1388
- <div class="property item public">
1389
- <div id="props_pkg" class="title">
1390
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l245"><code>lib&#x2F;models&#x2F;addon.js:245</code></a></span>
1391
- <h3 class="">
1392
- public
1393
-
1394
- final
1395
- pkg: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>
1396
- </h3>
1397
- </div>
1398
-
1399
-
1400
- <div class="property-description"><p>The contents of the addon's <code>package.json</code>.</p>
1401
- </div>
1402
-
1403
- </div>
1404
- <div class="property item public">
1405
- <div id="props_project" class="title">
1406
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l201"><code>lib&#x2F;models&#x2F;addon.js:201</code></a></span>
1407
- <h3 class="">
1408
- public
1409
-
1410
- final
1411
- project: <a href="../classes/Project.html" class="crosslink">Project</a>
1412
- </h3>
1413
- </div>
1414
-
1415
-
1416
- <div class="property-description"><p>The root <a href="../classes/Project.html" class="crosslink">project</a> to which this addon belongs.</p>
1417
- </div>
1418
-
1419
- </div>
1420
- <div class="property item public">
1421
- <div id="props_root" class="title">
1422
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l179"><code>lib&#x2F;models&#x2F;addon.js:179</code></a></span>
1423
- <h3 class="">
1424
- public
1425
-
1426
- final
1427
- root: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>
1428
- </h3>
1429
- </div>
1430
-
1431
-
1432
- <div class="property-description"><p>The absolute path of the root directory where this addon is located.</p>
1433
- </div>
1434
-
1435
- </div>
1436
- <div class="property item public">
1437
- <div id="props_ui" class="title">
1438
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l235"><code>lib&#x2F;models&#x2F;addon.js:235</code></a></span>
1439
- <h3 class="">
1440
- public
1441
-
1442
- final
1443
- ui: UI
1444
- </h3>
1445
- </div>
1446
-
1447
-
1448
- <div class="property-description"><p>A <a href="https://github.com/ember-cli/console-ui"><code>console-ui</code></a> object that can be used
1449
- to log messages for the user and indicate progress on long-running operations.</p>
1450
- </div>
1451
-
1452
- </div>
1453
- </div>
1454
-
1455
-
1456
-
1457
- <div id="methods public">
1458
- <h2 id="public-methods">Public Methods</h2>
1459
- <div class="method item public">
1460
- <div id="method_blueprintsPath" class="title">
1461
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1351"><code>lib&#x2F;models&#x2F;addon.js:1351</code></a></span>
1462
- <h3 class="">
1463
- public
1464
-
1465
-
1466
- blueprintsPath( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>
1467
- </h3>
1468
- </div>
1469
-
1470
-
1471
-
1472
- <div class="method-description"><p>Returns the path for addon blueprints.</p>
1473
- </div>
1474
-
1475
-
1476
- <div class="return">
1477
- <h4>Return:</h4>
1478
- <div>
1479
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
1480
- <span class="return-description"><p>The path for blueprints</p>
1481
- </span>
1482
- </div>
1483
- </div>
1484
-
1485
-
1486
- <h4>Example:</h4>
1487
- <ul>
1488
- <li><a href="https://github.com/kimroen/ember-cli-coffeescript/blob/v1.13.2/index.js#L26">ember-cli-coffeescript</a></li>
1489
- </ul>
1490
-
1491
- </div>
1492
- <div class="method item public">
1493
- <div id="method_buildError" class="title">
1494
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1650"><code>lib&#x2F;models&#x2F;addon.js:1650</code></a></span>
1495
- <h3 class="">
1496
- public
1497
-
1498
-
1499
- buildError(error)
1500
- </h3>
1501
- </div>
1502
-
1503
-
1504
-
1505
- <div class="method-description"><p>This hook is called when an error occurs during the preBuild, postBuild or outputReady hooks
1506
- for addons, or when the build fails</p>
1507
- <h4>Uses:</h4>
1508
- <ul>
1509
- <li>Custom error handling during build process</li>
1510
- </ul>
1511
- </div>
1512
-
1513
- <div class="params">
1514
- <h4>Parameters:</h4>
1515
- <table>
1516
- <thead>
1517
- <tr>
1518
- <th>Name</th>
1519
- <th>Type</th>
1520
- <th>Attribute</th>
1521
- <th>Description</th>
1522
- </tr>
1523
- </thead>
1524
- <tbody>
1525
- <tr>
1526
- <td>error</td>
1527
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="crosslink external" target="_blank">Error</a></td>
1528
- <td>
1529
- <ul>
1530
-
1531
-
1532
-
1533
- </ul>
1534
- </td>
1535
- <td><p>The error that was caught during the processes listed above</p>
1536
- </td>
1537
- </tr>
1538
-
1539
- </tbody>
1540
- </table>
1541
- </div>
1542
-
1543
-
1544
-
1545
- <h4>Example:</h4>
1546
- <ul>
1547
- <li><a href="https://github.com/rondale-sc/ember-cli-rails-addon/blob/v0.7.0/index.js#L11">ember-cli-rails-addon</a></li>
1548
- </ul>
1549
-
1550
- </div>
1551
- <div class="method item public">
1552
- <div id="method_cacheKeyForTree" class="title">
1553
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l674"><code>lib&#x2F;models&#x2F;addon.js:674</code></a></span>
1554
- <h3 class="">
1555
- public
1556
-
1557
-
1558
- cacheKeyForTree(treeType): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>
1559
- </h3>
1560
- </div>
1561
-
1562
-
1563
-
1564
- <div class="method-description"><p>Calculates a cacheKey for the given treeType. It is expected to return a
1565
- cache key allowing multiple builds of the same tree to simply return the
1566
- original tree (preventing duplicate work). If it returns null / undefined
1567
- the tree in question will opt out of this caching system.</p>
1568
- <p>This method is invoked prior to calling treeFor with the same tree name.</p>
1569
- <p>You should override this method if you implement custom treeFor or treeFor*
1570
- methods, which cause addons to opt-out of this caching.</p>
1571
- </div>
1572
-
1573
- <div class="params">
1574
- <h4>Parameters:</h4>
1575
- <table>
1576
- <thead>
1577
- <tr>
1578
- <th>Name</th>
1579
- <th>Type</th>
1580
- <th>Attribute</th>
1581
- <th>Description</th>
1582
- </tr>
1583
- </thead>
1584
- <tbody>
1585
- <tr>
1586
- <td>treeType</td>
1587
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></td>
1588
- <td>
1589
- <ul>
1590
-
1591
-
1592
-
1593
- </ul>
1594
- </td>
1595
- <td> </td>
1596
- </tr>
1597
-
1598
- </tbody>
1599
- </table>
1600
- </div>
1601
-
1602
- <div class="return">
1603
- <h4>Return:</h4>
1604
- <div>
1605
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
1606
- <span class="return-description"><p>cacheKey</p>
1607
- </span>
1608
- </div>
1609
- </div>
1610
-
1611
-
1612
- </div>
1613
- <div class="method item public">
1614
- <div id="method_config" class="title">
1615
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1369"><code>lib&#x2F;models&#x2F;addon.js:1369</code></a></span>
1616
- <h3 class="">
1617
- public
1618
-
1619
-
1620
- config(env, baseConfig): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>
1621
- </h3>
1622
- </div>
1623
-
1624
-
1625
-
1626
- <div class="method-description"><p>Augments the application's configuration settings.</p>
1627
- <p>Object returned from this hook is merged with the application's configuration object.</p>
1628
- <p>Application's configuration always take precedence.</p>
1629
- <h4>Uses:</h4>
1630
- <ul>
1631
- <li>Modifying configuration options (see list of defaults <a href="https://github.com/ember-cli/ember-cli/blob/v2.4.3/lib/broccoli/ember-app.js#L163">here</a>)
1632
- <ul>
1633
- <li>For example
1634
- <ul>
1635
- <li><code>minifyJS</code></li>
1636
- <li><code>storeConfigInMeta</code></li>
1637
- <li>et, al</li>
1638
- </ul>
1639
- </li>
1640
- </ul>
1641
- </li>
1642
- </ul>
1643
- </div>
1644
-
1645
- <div class="params">
1646
- <h4>Parameters:</h4>
1647
- <table>
1648
- <thead>
1649
- <tr>
1650
- <th>Name</th>
1651
- <th>Type</th>
1652
- <th>Attribute</th>
1653
- <th>Description</th>
1654
- </tr>
1655
- </thead>
1656
- <tbody>
1657
- <tr>
1658
- <td>env</td>
1659
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></td>
1660
- <td>
1661
- <ul>
1662
-
1663
-
1664
-
1665
- </ul>
1666
- </td>
1667
- <td><p>Name of current environment (ie "development")</p>
1668
- </td>
1669
- </tr>
1670
-
1671
- <tr>
1672
- <td>baseConfig</td>
1673
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
1674
- <td>
1675
- <ul>
1676
-
1677
-
1678
-
1679
- </ul>
1680
- </td>
1681
- <td><p>Initial application configuration</p>
1682
- </td>
1683
- </tr>
1684
-
1685
- </tbody>
1686
- </table>
1687
- </div>
1688
-
1689
- <div class="return">
1690
- <h4>Return:</h4>
1691
- <div>
1692
- <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>
1693
- <span class="return-description"><p>Configuration object to be merged with application configuration.</p>
1694
- </span>
1695
- </div>
1696
- </div>
1697
-
1698
-
1699
- <h4>Example:</h4>
1700
- <pre class="code prettyprint"><code class="language-js">config(environment, appConfig) {
1701
- return {
1702
- someAddonDefault: "foo"
1703
- };
1704
- }
1705
- </code></pre>
1706
-
1707
- </div>
1708
- <div class="method item public">
1709
- <div id="method_contentFor" class="title">
1710
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1727"><code>lib&#x2F;models&#x2F;addon.js:1727</code></a></span>
1711
- <h3 class="">
1712
- public
1713
-
1714
-
1715
- contentFor(type, config, content)
1716
- </h3>
1717
- </div>
1718
-
1719
-
1720
-
1721
- <div class="method-description"><p>Allow addons to implement contentFor method to add string output into the associated <code>{{content-for 'foo'}}</code> section in <code>index.html</code></p>
1722
- <p><strong>Uses:</strong></p>
1723
- <ul>
1724
- <li>For instance, to inject analytics code into <code>index.html</code></li>
1725
- </ul>
1726
- </div>
1727
-
1728
- <div class="params">
1729
- <h4>Parameters:</h4>
1730
- <table>
1731
- <thead>
1732
- <tr>
1733
- <th>Name</th>
1734
- <th>Type</th>
1735
- <th>Attribute</th>
1736
- <th>Description</th>
1737
- </tr>
1738
- </thead>
1739
- <tbody>
1740
- <tr>
1741
- <td>type</td>
1742
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
1743
- <td>
1744
- <ul>
1745
-
1746
-
1747
-
1748
- </ul>
1749
- </td>
1750
- <td> </td>
1751
- </tr>
1752
-
1753
- <tr>
1754
- <td>config</td>
1755
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
1756
- <td>
1757
- <ul>
1758
-
1759
-
1760
-
1761
- </ul>
1762
- </td>
1763
- <td> </td>
1764
- </tr>
1765
-
1766
- <tr>
1767
- <td>content</td>
1768
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
1769
- <td>
1770
- <ul>
1771
-
1772
-
1773
-
1774
- </ul>
1775
- </td>
1776
- <td> </td>
1777
- </tr>
1778
-
1779
- </tbody>
1780
- </table>
1781
- </div>
1782
-
1783
-
1784
-
1785
- <h4>Example:</h4>
1786
- <ul>
1787
- <li><a href="https://github.com/pgrippi/ember-cli-google-analytics/blob/v1.5.0/index.js#L79">ember-cli-google-analytics</a></li>
1788
- </ul>
1789
-
1790
- </div>
1791
- <div class="method item public">
1792
- <div id="method_dependencies" class="title">
1793
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1409"><code>lib&#x2F;models&#x2F;addon.js:1409</code></a></span>
1794
- <h3 class="">
1795
- public
1796
-
1797
-
1798
- dependencies( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>
1799
- </h3>
1800
- </div>
1801
-
1802
-
1803
-
1804
- <div class="method-description"></div>
1805
-
1806
-
1807
- <div class="return">
1808
- <h4>Return:</h4>
1809
- <div>
1810
- <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>
1811
- <span class="return-description"><p>The addon's dependencies based on the addon's package.json</p>
1812
- </span>
1813
- </div>
1814
- </div>
1815
-
1816
-
1817
- </div>
1818
- <div class="method item public">
1819
- <div id="method_findOwnAddonByName" class="title">
1820
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l340"><code>lib&#x2F;models&#x2F;addon.js:340</code></a></span>
1821
- <h3 class="">
1822
- public
1823
-
1824
-
1825
- findOwnAddonByName( )
1826
- </h3>
1827
- </div>
1828
-
1829
-
1830
-
1831
- <div class="method-description"><p>Find an addon of the current addon.</p>
1832
- <p>Example: ember-data depends on ember-cli-babel and wishes to have
1833
- additional control over transpilation this method helps.</p>
1834
- <pre class="code prettyprint"><code class="language-js">// ember-data/index.js
1835
- treeForAddon(tree) {
1836
- let babel = this.findOwnAddonByName('ember-cli-babel');
1837
-
1838
- return babel.transpileTree(tree, {
1839
- // customize the babel step (see: ember-cli-addons readme for more details);
1840
- });
1841
- }
1842
- </code></pre>
1843
- </div>
1844
-
1845
-
1846
-
1847
-
1848
- </div>
1849
- <div class="method item public">
1850
- <div id="method_hintingEnabled" class="title">
1851
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l364"><code>lib&#x2F;models&#x2F;addon.js:364</code></a></span>
1852
- <h3 class="">
1853
- public
1854
-
1855
-
1856
- hintingEnabled( )
1857
- </h3>
1858
- </div>
1859
-
1860
-
1861
-
1862
- <div class="method-description"><p>Check if the current addon intends to be hinted. Typically this is for
1863
- hinting/linting libraries such as eslint or jshint</p>
1864
- </div>
1865
-
1866
-
1867
-
1868
-
1869
- </div>
1870
- <div class="method item public">
1871
- <div id="method_import" class="title">
1872
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l772"><code>lib&#x2F;models&#x2F;addon.js:772</code></a></span>
1873
- <h3 class="">
1874
- public
1875
-
1876
-
1877
- import(asset, [options])
1878
- </h3>
1879
- </div>
1880
-
1881
-
1882
-
1883
- <div class="method-description"><p>Imports an asset into this addon.</p>
1884
- </div>
1885
-
1886
- <div class="params">
1887
- <h4>Parameters:</h4>
1888
- <table>
1889
- <thead>
1890
- <tr>
1891
- <th>Name</th>
1892
- <th>Type</th>
1893
- <th>Attribute</th>
1894
- <th>Description</th>
1895
- </tr>
1896
- </thead>
1897
- <tbody>
1898
- <tr>
1899
- <td>asset</td>
1900
- <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>
1901
- <td>
1902
- <ul>
1903
-
1904
-
1905
-
1906
- </ul>
1907
- </td>
1908
- <td><p>Either a path to the asset or an object with environment names and paths as key-value pairs.</p>
1909
- </td>
1910
- </tr>
1911
-
1912
- <tr>
1913
- <td>options</td>
1914
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
1915
- <td>
1916
- <ul>
1917
- <li>optional</li>
1918
-
1919
-
1920
- </ul>
1921
- </td>
1922
- <td><p>Options object</p>
1923
- </td>
1924
- </tr>
1925
-
1926
- <tr>
1927
- <td>options.type</td>
1928
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></td>
1929
- <td>
1930
- <ul>
1931
- <li>optional</li>
1932
-
1933
-
1934
- </ul>
1935
- </td>
1936
- <td><p>Either 'vendor' or 'test', defaults to 'vendor'</p>
1937
- </td>
1938
- </tr>
1939
- <tr>
1940
- <td>options.prepend</td>
1941
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></td>
1942
- <td>
1943
- <ul>
1944
- <li>optional</li>
1945
-
1946
-
1947
- </ul>
1948
- </td>
1949
- <td><p>Whether or not this asset should be prepended, defaults to false</p>
1950
- </td>
1951
- </tr>
1952
- <tr>
1953
- <td>options.destDir</td>
1954
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></td>
1955
- <td>
1956
- <ul>
1957
- <li>optional</li>
1958
-
1959
-
1960
- </ul>
1961
- </td>
1962
- <td><p>Destination directory, defaults to the name of the directory the asset is in</p>
1963
- </td>
1964
- </tr>
1965
- </tbody>
1966
- </table>
1967
- </div>
1968
-
1969
-
1970
-
1971
- </div>
1972
- <div class="method item public">
1973
- <div id="method_importTransforms" class="title">
1974
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1484"><code>lib&#x2F;models&#x2F;addon.js:1484</code></a></span>
1975
- <h3 class="">
1976
- public
1977
-
1978
-
1979
- importTransforms( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>
1980
- </h3>
1981
- </div>
1982
-
1983
-
1984
-
1985
- <div class="method-description"><p>Allows addons to define a custom transform function that other addons and app can use when using <code>app.import</code>.</p>
1986
- <p>This function is not implemented by default</p>
1987
- <h4>Uses:</h4>
1988
- <ul>
1989
- <li>An app or addons want to transform a dependency that is being imported using <code>app.import</code>.</li>
1990
- </ul>
1991
- </div>
1992
-
1993
-
1994
- <div class="return">
1995
- <h4>Return:</h4>
1996
- <div>
1997
- <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>
1998
- <span class="return-description"><p>An object with custom transforms</p>
1999
- </span>
2000
- </div>
2001
- </div>
2002
-
2003
-
2004
- <h4>Example:</h4>
2005
- <pre class="code prettyprint"><code class="language-js">importTransforms() {
2006
- return {
2007
- 'my-custom-transform': function(tree, options) {
2008
- // transform the incoming tree and return the updated tree
2009
- }
2010
- };
2011
- }
2012
- </code></pre>
2013
- <p>Alternatively, if you want to process <code>options</code> before being passed into the custom transform function, use:</p>
2014
- <pre class="code prettyprint"><code class="language-js">importTransforms() {
2015
- return {
2016
- 'my-custom-transform': {
2017
- transform: function(tree, options) {
2018
- // transform the incoming tree and return the updated tree
2019
- },
2020
- processOptions: function(assetPath, entry, options) {
2021
- // process your options
2022
-
2023
- return options
2024
- }
2025
- };
2026
- }
2027
- </code></pre>
2028
-
2029
- </div>
2030
- <div class="method item public">
2031
- <div id="method_included" class="title">
2032
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l739"><code>lib&#x2F;models&#x2F;addon.js:739</code></a></span>
2033
- <h3 class="">
2034
- public
2035
-
2036
-
2037
- included(parent)
2038
- </h3>
2039
- </div>
2040
-
2041
-
2042
-
2043
- <div class="method-description"><p>This method is called when the addon is included in a build. You
2044
- would typically use this hook to perform additional imports</p>
2045
- <h4>Uses:</h4>
2046
- <ul>
2047
- <li>including vendor files</li>
2048
- <li>setting configuration options</li>
2049
- </ul>
2050
- <p><em>Note:</em> Any options set in the consuming application will override the addon.</p>
2051
- </div>
2052
-
2053
- <div class="params">
2054
- <h4>Parameters:</h4>
2055
- <table>
2056
- <thead>
2057
- <tr>
2058
- <th>Name</th>
2059
- <th>Type</th>
2060
- <th>Attribute</th>
2061
- <th>Description</th>
2062
- </tr>
2063
- </thead>
2064
- <tbody>
2065
- <tr>
2066
- <td>parent</td>
2067
- <td><a href="../classes/EmberApp.html" class="crosslink">EmberApp</a> | <a href="../classes/EmberAddon.html" class="crosslink">EmberAddon</a></td>
2068
- <td>
2069
- <ul>
2070
-
2071
-
2072
-
2073
- </ul>
2074
- </td>
2075
- <td><p>The parent object which included this addon</p>
2076
- </td>
2077
- </tr>
2078
-
2079
- </tbody>
2080
- </table>
2081
- </div>
2082
-
2083
-
2084
-
2085
- <h4>Example:</h4>
2086
- <pre class="code prettyprint"><code class="language-js">included(parent) {
2087
- this._super.included.apply(this, arguments);
2088
- this.import(somePath);
2089
- }
2090
- </code></pre>
2091
-
2092
- </div>
2093
- <div class="method item public">
2094
- <div id="method_includedCommands" class="title">
2095
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1460"><code>lib&#x2F;models&#x2F;addon.js:1460</code></a></span>
2096
- <h3 class="">
2097
- public
2098
-
2099
-
2100
- includedCommands( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>
2101
- </h3>
2102
- </div>
2103
-
2104
-
2105
-
2106
- <div class="method-description"><p>Allows the specification of custom addon commands.
2107
- Expects you to return an object whose key is the name of the command and value is the command instance..</p>
2108
- <p>This function is not implemented by default</p>
2109
- <h4>Uses:</h4>
2110
- <ul>
2111
- <li>Include custom commands into consuming application</li>
2112
- </ul>
2113
- </div>
2114
-
2115
-
2116
- <div class="return">
2117
- <h4>Return:</h4>
2118
- <div>
2119
- <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>
2120
- <span class="return-description"><p>An object with included commands</p>
2121
- </span>
2122
- </div>
2123
- </div>
2124
-
2125
-
2126
- <h4>Example:</h4>
2127
- <pre class="code prettyprint"><code class="language-js">includedCommands() {
2128
- return {
2129
- 'do-foo': require('./lib/commands/foo')
2130
- };
2131
- }
2132
- </code></pre>
2133
-
2134
- </div>
2135
- <div class="method item public">
2136
- <div id="method_init" class="title">
2137
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l254"><code>lib&#x2F;models&#x2F;addon.js:254</code></a></span>
2138
- <h3 class="">
2139
- public
2140
-
2141
-
2142
- init(parent, project)
2143
- </h3>
2144
- </div>
2145
-
2146
-
2147
-
2148
- <div class="method-description"><p>Initializes the addon. If you override this method make sure and call <code>this._super.init &amp;&amp; this._super.init.apply(this, arguments);</code> or your addon will not work.</p>
2149
- </div>
2150
-
2151
- <div class="params">
2152
- <h4>Parameters:</h4>
2153
- <table>
2154
- <thead>
2155
- <tr>
2156
- <th>Name</th>
2157
- <th>Type</th>
2158
- <th>Attribute</th>
2159
- <th>Description</th>
2160
- </tr>
2161
- </thead>
2162
- <tbody>
2163
- <tr>
2164
- <td>parent</td>
2165
- <td><a href="../classes/Project.html" class="crosslink">Project</a> | <a href="../classes/Addon.html" class="crosslink">Addon</a></td>
2166
- <td>
2167
- <ul>
2168
-
2169
-
2170
-
2171
- </ul>
2172
- </td>
2173
- <td><p>The project or addon that directly depends on this addon</p>
2174
- </td>
2175
- </tr>
2176
-
2177
- <tr>
2178
- <td>project</td>
2179
- <td><a href="../classes/Project.html" class="crosslink">Project</a></td>
2180
- <td>
2181
- <ul>
2182
-
2183
-
2184
-
2185
- </ul>
2186
- </td>
2187
- <td><p>The current project (deprecated)</p>
2188
- </td>
2189
- </tr>
2190
-
2191
- </tbody>
2192
- </table>
2193
- </div>
2194
-
2195
-
2196
-
2197
- <h4>Example:</h4>
2198
- <pre class="code prettyprint"><code class="language-js">init(parent, project) {
2199
- this._super.init &amp;&amp; this._super.init.apply(this, arguments);
2200
- this._someCustomSetup();
2201
- }
2202
- </code></pre>
2203
-
2204
- </div>
2205
- <div class="method item public">
2206
- <div id="method_isDevelopingAddon" class="title">
2207
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l393"><code>lib&#x2F;models&#x2F;addon.js:393</code></a></span>
2208
- <h3 class="">
2209
- public
2210
-
2211
-
2212
- isDevelopingAddon( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
2213
- </h3>
2214
- </div>
2215
-
2216
-
2217
-
2218
- <div class="method-description"><p>Allows to mark the addon as developing, triggering live-reload in the project the addon is linked to.</p>
2219
- <h4>Uses:</h4>
2220
- <ul>
2221
- <li>Working on projects with internal addons</li>
2222
- </ul>
2223
- </div>
2224
-
2225
-
2226
- <div class="return">
2227
- <h4>Return:</h4>
2228
- <div>
2229
- <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>
2230
- <span class="return-description"></span>
2231
- </div>
2232
- </div>
2233
-
2234
-
2235
- </div>
2236
- <div class="method item public">
2237
- <div id="method_isEnabled" class="title">
2238
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1419"><code>lib&#x2F;models&#x2F;addon.js:1419</code></a></span>
2239
- <h3 class="">
2240
- public
2241
-
2242
-
2243
- isEnabled( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
2244
- </h3>
2245
- </div>
2246
-
2247
-
2248
-
2249
- <div class="method-description"></div>
2250
-
2251
-
2252
- <div class="return">
2253
- <h4>Return:</h4>
2254
- <div>
2255
- <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>
2256
- <span class="return-description"><p>Whether or not this addon is enabled</p>
2257
- </span>
2258
- </div>
2259
- </div>
2260
-
2261
-
2262
- </div>
2263
- <div class="method item public">
2264
- <div id="method_lintTree" class="title">
2265
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1708"><code>lib&#x2F;models&#x2F;addon.js:1708</code></a></span>
2266
- <h3 class="">
2267
- public
2268
-
2269
-
2270
- lintTree(treeType, tree)
2271
- </h3>
2272
- </div>
2273
-
2274
-
2275
-
2276
- <div class="method-description"><p>Return value is merged into the <strong>tests</strong> tree. This lets you inject
2277
- linter output as test results.</p>
2278
- <p><strong>Uses:</strong></p>
2279
- <ul>
2280
- <li>JSHint</li>
2281
- <li>any other form of automated test generation that turns code into tests</li>
2282
- </ul>
2283
- </div>
2284
-
2285
- <div class="params">
2286
- <h4>Parameters:</h4>
2287
- <table>
2288
- <thead>
2289
- <tr>
2290
- <th>Name</th>
2291
- <th>Type</th>
2292
- <th>Attribute</th>
2293
- <th>Description</th>
2294
- </tr>
2295
- </thead>
2296
- <tbody>
2297
- <tr>
2298
- <td>treeType</td>
2299
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></td>
2300
- <td>
2301
- <ul>
2302
-
2303
-
2304
-
2305
- </ul>
2306
- </td>
2307
- <td><p><code>app</code>, <code>tests</code>, <code>templates</code>, or <code>addon</code></p>
2308
- </td>
2309
- </tr>
2310
-
2311
- <tr>
2312
- <td>tree</td>
2313
- <td>Tree</td>
2314
- <td>
2315
- <ul>
2316
-
2317
-
2318
-
2319
- </ul>
2320
- </td>
2321
- <td><p>tree of files (JavaScript files for <code>app</code>, <code>tests</code>, and <code>addon</code> types)</p>
2322
- </td>
2323
- </tr>
2324
-
2325
- </tbody>
2326
- </table>
2327
- </div>
2328
-
2329
-
2330
-
2331
- <h4>Example:</h4>
2332
- <ul>
2333
- <li><a href="https://github.com/ember-cli/ember-cli-qunit/blob/v1.4.1/index.js#L206">ember-cli-qunit</a></li>
2334
- <li><a href="https://github.com/ef4/ember-cli-mocha/blob/66803037fe203b24e96dea83a2bd91de48b842e1/index.js#L101">ember-cli-mocha</a></li>
2335
- </ul>
2336
-
2337
- </div>
2338
- <div class="method item public">
2339
- <div id="method_moduleName" class="title">
2340
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1336"><code>lib&#x2F;models&#x2F;addon.js:1336</code></a></span>
2341
- <h3 class="">
2342
- public
2343
-
2344
-
2345
- moduleName( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>
2346
- </h3>
2347
- </div>
2348
-
2349
-
2350
-
2351
- <div class="method-description"><p>Returns the module name for this addon.</p>
2352
- </div>
2353
-
2354
-
2355
- <div class="return">
2356
- <h4>Return:</h4>
2357
- <div>
2358
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
2359
- <span class="return-description"><p>module name</p>
2360
- </span>
2361
- </div>
2362
- </div>
2363
-
2364
-
2365
- </div>
2366
- <div class="method item public">
2367
- <div id="method_outputReady" class="title">
2368
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1633"><code>lib&#x2F;models&#x2F;addon.js:1633</code></a></span>
2369
- <h3 class="">
2370
- public
2371
-
2372
-
2373
- outputReady(result)
2374
- </h3>
2375
- </div>
2376
-
2377
-
2378
-
2379
- <div class="method-description"><p>This hook is called after the build has been processed and the build files have been copied to the output directory</p>
2380
- <p>It's passed a <code>result</code> object which contains:</p>
2381
- <ul>
2382
- <li><code>directory</code> Path to build output</li>
2383
- </ul>
2384
- </div>
2385
-
2386
- <div class="params">
2387
- <h4>Parameters:</h4>
2388
- <table>
2389
- <thead>
2390
- <tr>
2391
- <th>Name</th>
2392
- <th>Type</th>
2393
- <th>Attribute</th>
2394
- <th>Description</th>
2395
- </tr>
2396
- </thead>
2397
- <tbody>
2398
- <tr>
2399
- <td>result</td>
2400
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
2401
- <td>
2402
- <ul>
2403
-
2404
-
2405
-
2406
- </ul>
2407
- </td>
2408
- <td><p>Build result object</p>
2409
- </td>
2410
- </tr>
2411
-
2412
- </tbody>
2413
- </table>
2414
- </div>
2415
-
2416
-
2417
-
2418
- <h4>Example:</h4>
2419
- <ul>
2420
- <li>Opportunity to symlink or copy files elsewhere.</li>
2421
- <li><a href="https://github.com/rondale-sc/ember-cli-rails-addon/blob/v0.7.0/index.js#L45">ember-cli-rails-addon</a>
2422
- <ul>
2423
- <li>In this case we are using this in tandem with a rails middleware to remove a lock file.
2424
- This allows our ruby gem to block incoming requests until after the build happens reliably.</li>
2425
- </ul>
2426
- </li>
2427
- </ul>
2428
-
2429
- </div>
2430
- <div class="method item public">
2431
- <div id="method_postBuild" class="title">
2432
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1617"><code>lib&#x2F;models&#x2F;addon.js:1617</code></a></span>
2433
- <h3 class="">
2434
- public
2435
-
2436
-
2437
- postBuild(result)
2438
- </h3>
2439
- </div>
2440
-
2441
-
2442
-
2443
- <div class="method-description"><p>This hook is called after a build is complete.</p>
2444
- <p>It's passed a <code>result</code> object which contains:</p>
2445
- <ul>
2446
- <li><code>directory</code> Path to build output</li>
2447
- </ul>
2448
- <h4>Uses:</h4>
2449
- <ul>
2450
- <li>Slow tree listing</li>
2451
- <li>May be used to manipulate your project after build has happened</li>
2452
- </ul>
2453
- </div>
2454
-
2455
- <div class="params">
2456
- <h4>Parameters:</h4>
2457
- <table>
2458
- <thead>
2459
- <tr>
2460
- <th>Name</th>
2461
- <th>Type</th>
2462
- <th>Attribute</th>
2463
- <th>Description</th>
2464
- </tr>
2465
- </thead>
2466
- <tbody>
2467
- <tr>
2468
- <td>result</td>
2469
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
2470
- <td>
2471
- <ul>
2472
-
2473
-
2474
-
2475
- </ul>
2476
- </td>
2477
- <td><p>Build result object</p>
2478
- </td>
2479
- </tr>
2480
-
2481
- </tbody>
2482
- </table>
2483
- </div>
2484
-
2485
-
2486
-
2487
- </div>
2488
- <div class="method item public">
2489
- <div id="method_postprocessTree" class="title">
2490
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1542"><code>lib&#x2F;models&#x2F;addon.js:1542</code></a></span>
2491
- <h3 class="">
2492
- public
2493
-
2494
-
2495
- postprocessTree(type, tree): Tree
2496
- </h3>
2497
- </div>
2498
-
2499
-
2500
-
2501
- <div class="method-description"><p>Post-process a tree</p>
2502
- </div>
2503
-
2504
- <div class="params">
2505
- <h4>Parameters:</h4>
2506
- <table>
2507
- <thead>
2508
- <tr>
2509
- <th>Name</th>
2510
- <th>Type</th>
2511
- <th>Attribute</th>
2512
- <th>Description</th>
2513
- </tr>
2514
- </thead>
2515
- <tbody>
2516
- <tr>
2517
- <td>type</td>
2518
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></td>
2519
- <td>
2520
- <ul>
2521
-
2522
-
2523
-
2524
- </ul>
2525
- </td>
2526
- <td><p>What kind of tree (eg. 'js', 'css', 'template')</p>
2527
- </td>
2528
- </tr>
2529
-
2530
- <tr>
2531
- <td>tree</td>
2532
- <td>Tree</td>
2533
- <td>
2534
- <ul>
2535
-
2536
-
2537
-
2538
- </ul>
2539
- </td>
2540
- <td><p>Tree to process</p>
2541
- </td>
2542
- </tr>
2543
-
2544
- </tbody>
2545
- </table>
2546
- </div>
2547
-
2548
- <div class="return">
2549
- <h4>Return:</h4>
2550
- <div>
2551
- <span class="return-type">Tree</span>
2552
- <span class="return-description"><p>Processed tree</p>
2553
- </span>
2554
- </div>
2555
- </div>
2556
-
2557
-
2558
- <h4>Example:</h4>
2559
- <ul>
2560
- <li><a href="https://github.com/rickharrison/broccoli-asset-rev/blob/c82c3580855554a31f7d6600b866aecf69cdaa6d/index.js#L29">broccoli-asset-rev</a></li>
2561
- </ul>
2562
-
2563
- </div>
2564
- <div class="method item public">
2565
- <div id="method_preBuild" class="title">
2566
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1609"><code>lib&#x2F;models&#x2F;addon.js:1609</code></a></span>
2567
- <h3 class="">
2568
- public
2569
-
2570
-
2571
- preBuild(result)
2572
- </h3>
2573
- </div>
2574
-
2575
-
2576
-
2577
- <div class="method-description"><p>This hook is called before a build takes place.</p>
2578
- </div>
2579
-
2580
- <div class="params">
2581
- <h4>Parameters:</h4>
2582
- <table>
2583
- <thead>
2584
- <tr>
2585
- <th>Name</th>
2586
- <th>Type</th>
2587
- <th>Attribute</th>
2588
- <th>Description</th>
2589
- </tr>
2590
- </thead>
2591
- <tbody>
2592
- <tr>
2593
- <td>result</td>
2594
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
2595
- <td>
2596
- <ul>
2597
-
2598
-
2599
-
2600
- </ul>
2601
- </td>
2602
- <td><p>Build object</p>
2603
- </td>
2604
- </tr>
2605
-
2606
- </tbody>
2607
- </table>
2608
- </div>
2609
-
2610
-
2611
-
2612
- </div>
2613
- <div class="method item public">
2614
- <div id="method_preprocessTree" class="title">
2615
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1528"><code>lib&#x2F;models&#x2F;addon.js:1528</code></a></span>
2616
- <h3 class="">
2617
- public
2618
-
2619
-
2620
- preprocessTree(type, tree): Tree
2621
- </h3>
2622
- </div>
2623
-
2624
-
2625
-
2626
- <div class="method-description"><p>Pre-process a tree</p>
2627
- <h4>Uses:</h4>
2628
- <ul>
2629
- <li>removing / adding files from the build.</li>
2630
- </ul>
2631
- </div>
2632
-
2633
- <div class="params">
2634
- <h4>Parameters:</h4>
2635
- <table>
2636
- <thead>
2637
- <tr>
2638
- <th>Name</th>
2639
- <th>Type</th>
2640
- <th>Attribute</th>
2641
- <th>Description</th>
2642
- </tr>
2643
- </thead>
2644
- <tbody>
2645
- <tr>
2646
- <td>type</td>
2647
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></td>
2648
- <td>
2649
- <ul>
2650
-
2651
-
2652
-
2653
- </ul>
2654
- </td>
2655
- <td><p>What kind of tree (eg. 'js', 'css', 'template')</p>
2656
- </td>
2657
- </tr>
2658
-
2659
- <tr>
2660
- <td>tree</td>
2661
- <td>Tree</td>
2662
- <td>
2663
- <ul>
2664
-
2665
-
2666
-
2667
- </ul>
2668
- </td>
2669
- <td><p>Tree to process</p>
2670
- </td>
2671
- </tr>
2672
-
2673
- </tbody>
2674
- </table>
2675
- </div>
2676
-
2677
- <div class="return">
2678
- <h4>Return:</h4>
2679
- <div>
2680
- <span class="return-type">Tree</span>
2681
- <span class="return-description"><p>Processed tree</p>
2682
- </span>
2683
- </div>
2684
- </div>
2685
-
2686
-
2687
- </div>
2688
- <div class="method item public">
2689
- <div id="method_serverMiddleware" class="title">
2690
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1555"><code>lib&#x2F;models&#x2F;addon.js:1555</code></a></span>
2691
- <h3 class="">
2692
- public
2693
-
2694
-
2695
- serverMiddleware(startOptions)
2696
- </h3>
2697
- </div>
2698
-
2699
-
2700
-
2701
- <div class="method-description"><p>This hook allows you to make changes to the express server run by ember-cli.</p>
2702
- <p>It's passed a <code>startOptions</code> object which contains:</p>
2703
- <ul>
2704
- <li><code>app</code> Express server instance</li>
2705
- <li><code>options</code> A hash with:
2706
- <ul>
2707
- <li><code>project</code> Current <a href="../classes/Project.html" class="crosslink">project</a></li>
2708
- <li><code>watcher</code></li>
2709
- <li><code>environment</code></li>
2710
- </ul>
2711
- </li>
2712
- </ul>
2713
- <p>This function is not implemented by default</p>
2714
- <h4>Uses:</h4>
2715
- <ul>
2716
- <li>Tacking on headers to each request</li>
2717
- <li>Modifying the request object</li>
2718
- </ul>
2719
- <p><em>Note:</em> that this should only be used in development, and if you need the same behavior in production you'll
2720
- need to configure your server.</p>
2721
- </div>
2722
-
2723
- <div class="params">
2724
- <h4>Parameters:</h4>
2725
- <table>
2726
- <thead>
2727
- <tr>
2728
- <th>Name</th>
2729
- <th>Type</th>
2730
- <th>Attribute</th>
2731
- <th>Description</th>
2732
- </tr>
2733
- </thead>
2734
- <tbody>
2735
- <tr>
2736
- <td>startOptions</td>
2737
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
2738
- <td>
2739
- <ul>
2740
-
2741
-
2742
-
2743
- </ul>
2744
- </td>
2745
- <td><p>Express server start options</p>
2746
- </td>
2747
- </tr>
2748
-
2749
- </tbody>
2750
- </table>
2751
- </div>
2752
-
2753
-
2754
-
2755
- <h4>Example:</h4>
2756
- <pre class="code prettyprint"><code class="language-js">serverMiddleware(startOptions) {
2757
- var app = startOptions.app;
2758
-
2759
- app.use(function(req, res, next) {
2760
- // Some middleware
2761
- });
2762
- }
2763
- </code></pre>
2764
- <ul>
2765
- <li><a href="https://github.com/rwjblue/ember-cli-content-security-policy/blob/v0.5.0/index.js#L84">ember-cli-content-security-policy</a></li>
2766
- <li><a href="https://github.com/ember-cli/ember-cli/blob/v2.4.3/lib/tasks/server/middleware/history-support/index.js#L25">history-support-addon</a></li>
2767
- </ul>
2768
-
2769
- </div>
2770
- <div class="method item public">
2771
- <div id="method_setupPreprocessorRegistry" class="title">
2772
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1666"><code>lib&#x2F;models&#x2F;addon.js:1666</code></a></span>
2773
- <h3 class="">
2774
- public
2775
-
2776
-
2777
- setupPreprocessorRegistry(type, registry)
2778
- </h3>
2779
- </div>
2780
-
2781
-
2782
-
2783
- <div class="method-description"><p>Used to add preprocessors to the preprocessor registry. This is often used by addons like <a href="https://github.com/ember-cli/ember-cli-htmlbars">ember-cli-htmlbars</a>
2784
- and <a href="https://github.com/kimroen/ember-cli-coffeescript">ember-cli-coffeescript</a> to add a <code>template</code> or <code>js</code> preprocessor to the registry.</p>
2785
- <p><strong>Uses:</strong></p>
2786
- <ul>
2787
- <li>Adding preprocessors to the registry.</li>
2788
- </ul>
2789
- </div>
2790
-
2791
- <div class="params">
2792
- <h4>Parameters:</h4>
2793
- <table>
2794
- <thead>
2795
- <tr>
2796
- <th>Name</th>
2797
- <th>Type</th>
2798
- <th>Attribute</th>
2799
- <th>Description</th>
2800
- </tr>
2801
- </thead>
2802
- <tbody>
2803
- <tr>
2804
- <td>type</td>
2805
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></td>
2806
- <td>
2807
- <ul>
2808
-
2809
-
2810
-
2811
- </ul>
2812
- </td>
2813
- <td><p>either <code>"self"</code> or <code>"parent"</code></p>
2814
- </td>
2815
- </tr>
2816
-
2817
- <tr>
2818
- <td>registry</td>
2819
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
2820
- <td>
2821
- <ul>
2822
-
2823
-
2824
-
2825
- </ul>
2826
- </td>
2827
- <td><p>the registry to be set up</p>
2828
- </td>
2829
- </tr>
2830
-
2831
- </tbody>
2832
- </table>
2833
- </div>
2834
-
2835
-
2836
-
2837
- <h4>Example:</h4>
2838
- <pre class="code prettyprint"><code class="language-js">setupPreprocessorRegistry(type, registry) {
2839
- // ensure that broccoli-ember-hbs-template-compiler is not processing hbs files
2840
- registry.remove('template', 'broccoli-ember-hbs-template-compiler');
2841
-
2842
- registry.add('template', {
2843
- name: 'ember-cli-htmlbars',
2844
- ext: 'hbs',
2845
- _addon: this,
2846
- toTree(tree) {
2847
- var htmlbarsOptions = this._addon.htmlbarsOptions();
2848
- return htmlbarsCompile(tree, htmlbarsOptions);
2849
- },
2850
-
2851
- precompile(string) {
2852
- var htmlbarsOptions = this._addon.htmlbarsOptions();
2853
- var templateCompiler = htmlbarsOptions.templateCompiler;
2854
- return utils.template(templateCompiler, string);
2855
- }
2856
- });
2857
-
2858
- if (type === 'parent') {
2859
- this.parentRegistry = registry;
2860
- }
2861
- }
2862
- </code></pre>
2863
-
2864
- </div>
2865
- <div class="method item public">
2866
- <div id="method_shouldIncludeChildAddon" class="title">
2867
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1428"><code>lib&#x2F;models&#x2F;addon.js:1428</code></a></span>
2868
- <h3 class="">
2869
- public
2870
-
2871
-
2872
- shouldIncludeChildAddon(childAddon): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
2873
- </h3>
2874
- </div>
2875
-
2876
-
2877
-
2878
- <div class="method-description"><p>Can be used to exclude addons from being added as a child addon.</p>
2879
- <h4>Uses:</h4>
2880
- <ul>
2881
- <li>Abstract away multiple addons while only including one into the built assets</li>
2882
- </ul>
2883
- </div>
2884
-
2885
- <div class="params">
2886
- <h4>Parameters:</h4>
2887
- <table>
2888
- <thead>
2889
- <tr>
2890
- <th>Name</th>
2891
- <th>Type</th>
2892
- <th>Attribute</th>
2893
- <th>Description</th>
2894
- </tr>
2895
- </thead>
2896
- <tbody>
2897
- <tr>
2898
- <td>childAddon</td>
2899
- <td><a href="../classes/Addon.html" class="crosslink">Addon</a></td>
2900
- <td>
2901
- <ul>
2902
-
2903
-
2904
-
2905
- </ul>
2906
- </td>
2907
- <td> </td>
2908
- </tr>
2909
-
2910
- </tbody>
2911
- </table>
2912
- </div>
2913
-
2914
- <div class="return">
2915
- <h4>Return:</h4>
2916
- <div>
2917
- <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>
2918
- <span class="return-description"><p>Whether or not a child addon is supposed to be included</p>
2919
- </span>
2920
- </div>
2921
- </div>
2922
-
2923
-
2924
- <h4>Example:</h4>
2925
- <pre class="code prettyprint"><code class="language-js">shouldIncludeChildAddon(childAddon) {
2926
- if(childAddon.name === 'ember-cli-some-legacy-select-component') {
2927
- return this.options.legacyMode;
2928
- } else if(childAddon.name === 'ember-cli-awesome-new-select-component') {
2929
- return !this.options.legacyMode;
2930
- } else {
2931
- return this._super.shouldIncludeChildAddon.apply(this, arguments);
2932
- }
2933
- }
2934
- </code></pre>
2935
-
2936
- </div>
2937
- <div class="method item public">
2938
- <div id="method_testemMiddleware" class="title">
2939
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1594"><code>lib&#x2F;models&#x2F;addon.js:1594</code></a></span>
2940
- <h3 class="">
2941
- public
2942
-
2943
-
2944
- testemMiddleware(app)
2945
- </h3>
2946
- </div>
2947
-
2948
-
2949
-
2950
- <div class="method-description"><p>This hook allows you to make changes to the express server run by testem.</p>
2951
- <p>This function is not implemented by default</p>
2952
- <h4>Uses:</h4>
2953
- <ul>
2954
- <li>Adding custom test-specific endpoints</li>
2955
- <li>Manipulating HTTP requests in tests</li>
2956
- </ul>
2957
- </div>
2958
-
2959
- <div class="params">
2960
- <h4>Parameters:</h4>
2961
- <table>
2962
- <thead>
2963
- <tr>
2964
- <th>Name</th>
2965
- <th>Type</th>
2966
- <th>Attribute</th>
2967
- <th>Description</th>
2968
- </tr>
2969
- </thead>
2970
- <tbody>
2971
- <tr>
2972
- <td>app</td>
2973
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
2974
- <td>
2975
- <ul>
2976
-
2977
-
2978
-
2979
- </ul>
2980
- </td>
2981
- <td><p>the express app instance</p>
2982
- </td>
2983
- </tr>
2984
-
2985
- </tbody>
2986
- </table>
2987
- </div>
2988
-
2989
-
2990
-
2991
- </div>
2992
- <div class="method item public">
2993
- <div id="method_treeFor" class="title">
2994
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l586"><code>lib&#x2F;models&#x2F;addon.js:586</code></a></span>
2995
- <h3 class="">
2996
- public
2997
-
2998
-
2999
- treeFor(name): Tree
3000
- </h3>
3001
- </div>
3002
-
3003
-
3004
-
3005
- <div class="method-description"><p>Returns a given type of tree (if present), merged with the
3006
- application tree. For each of the trees available using this
3007
- method, you can also use a direct method called <code>treeFor[Type]</code> (eg. <code>treeForApp</code>).</p>
3008
- <p>Available tree names:</p>
3009
- <ul>
3010
- <li><a href="../classes/Addon.html#method_treeForApp" class="crosslink">app</a></li>
3011
- <li><a href="../classes/Addon.html#method_treeForStyles" class="crosslink">styles</a></li>
3012
- <li><a href="../classes/Addon.html#method_treeForTemplates" class="crosslink">templates</a></li>
3013
- <li><a href="../classes/Addon.html#method_treeForAddonTemplates" class="crosslink">addon-templates</a></li>
3014
- <li><a href="../classes/Addon.html#method_treeForAddon" class="crosslink">addon</a></li>
3015
- <li><a href="../classes/Addon.html#method_treeForVendor" class="crosslink">vendor</a></li>
3016
- <li><a href="../classes/Addon.html#method_treeForTestSupport" class="crosslink">test-support</a></li>
3017
- <li><a href="../classes/Addon.html#method_treeForAddonTestSupport" class="crosslink">addon-test-support</a></li>
3018
- <li><a href="../classes/Addon.html#method_treeForPublic" class="crosslink">public</a></li>
3019
- </ul>
3020
- <h4>Uses:</h4>
3021
- <ul>
3022
- <li>manipulating trees at build time</li>
3023
- </ul>
3024
- </div>
3025
-
3026
- <div class="params">
3027
- <h4>Parameters:</h4>
3028
- <table>
3029
- <thead>
3030
- <tr>
3031
- <th>Name</th>
3032
- <th>Type</th>
3033
- <th>Attribute</th>
3034
- <th>Description</th>
3035
- </tr>
3036
- </thead>
3037
- <tbody>
3038
- <tr>
3039
- <td>name</td>
3040
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></td>
3041
- <td>
3042
- <ul>
3043
-
3044
-
3045
-
3046
- </ul>
3047
- </td>
3048
- <td> </td>
3049
- </tr>
3050
-
3051
- </tbody>
3052
- </table>
3053
- </div>
3054
-
3055
- <div class="return">
3056
- <h4>Return:</h4>
3057
- <div>
3058
- <span class="return-type">Tree</span>
3059
- <span class="return-description"></span>
3060
- </div>
3061
- </div>
3062
-
3063
-
3064
- </div>
3065
- <div class="method item public">
3066
- <div id="method_treeForAddon" class="title">
3067
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l828"><code>lib&#x2F;models&#x2F;addon.js:828</code></a></span>
3068
- <h3 class="">
3069
- public
3070
-
3071
-
3072
- treeForAddon(tree): Tree
3073
- </h3>
3074
- </div>
3075
-
3076
-
3077
-
3078
- <div class="method-description"><p>Returns a tree for this addon</p>
3079
- </div>
3080
-
3081
- <div class="params">
3082
- <h4>Parameters:</h4>
3083
- <table>
3084
- <thead>
3085
- <tr>
3086
- <th>Name</th>
3087
- <th>Type</th>
3088
- <th>Attribute</th>
3089
- <th>Description</th>
3090
- </tr>
3091
- </thead>
3092
- <tbody>
3093
- <tr>
3094
- <td>tree</td>
3095
- <td>Tree</td>
3096
- <td>
3097
- <ul>
3098
-
3099
-
3100
-
3101
- </ul>
3102
- </td>
3103
- <td> </td>
3104
- </tr>
3105
-
3106
- </tbody>
3107
- </table>
3108
- </div>
3109
-
3110
- <div class="return">
3111
- <h4>Return:</h4>
3112
- <div>
3113
- <span class="return-type">Tree</span>
3114
- <span class="return-description"><p>Addon file tree</p>
3115
- </span>
3116
- </div>
3117
- </div>
3118
-
3119
-
3120
- <h4>Example:</h4>
3121
- <pre class="code prettyprint"><code class="language-js">treeForAddon() {
3122
- var tree = this._super.treeForAddon.apply(this, arguments);
3123
- var checker = new VersionChecker(this);
3124
- var isOldEmber = checker.for('ember', 'bower').lt('1.13.0');
3125
-
3126
- if (isOldEmber) {
3127
- tree = new Funnel(tree, { exclude: [ /instance-initializers/ ] });
3128
- }
3129
-
3130
- return tree;
3131
- }
3132
- </code></pre>
3133
-
3134
- </div>
3135
- <div class="method item public">
3136
- <div id="method_treeForAddonTemplates" class="title">
3137
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l816"><code>lib&#x2F;models&#x2F;addon.js:816</code></a></span>
3138
- <h3 class="">
3139
- public
3140
-
3141
-
3142
- treeForAddonTemplates(tree): Tree
3143
- </h3>
3144
- </div>
3145
-
3146
-
3147
-
3148
- <div class="method-description"><p>Returns the tree for this addon's templates</p>
3149
- </div>
3150
-
3151
- <div class="params">
3152
- <h4>Parameters:</h4>
3153
- <table>
3154
- <thead>
3155
- <tr>
3156
- <th>Name</th>
3157
- <th>Type</th>
3158
- <th>Attribute</th>
3159
- <th>Description</th>
3160
- </tr>
3161
- </thead>
3162
- <tbody>
3163
- <tr>
3164
- <td>tree</td>
3165
- <td>Tree</td>
3166
- <td>
3167
- <ul>
3168
-
3169
-
3170
-
3171
- </ul>
3172
- </td>
3173
- <td> </td>
3174
- </tr>
3175
-
3176
- </tbody>
3177
- </table>
3178
- </div>
3179
-
3180
- <div class="return">
3181
- <h4>Return:</h4>
3182
- <div>
3183
- <span class="return-type">Tree</span>
3184
- <span class="return-description"><p>Addon Template file tree</p>
3185
- </span>
3186
- </div>
3187
- </div>
3188
-
3189
-
3190
- </div>
3191
- <div class="method item public">
3192
- <div id="method_treeForAddonTestSupport" class="title">
3193
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l925"><code>lib&#x2F;models&#x2F;addon.js:925</code></a></span>
3194
- <h3 class="">
3195
- public
3196
-
3197
-
3198
- treeForAddonTestSupport(tree): Tree
3199
- </h3>
3200
- </div>
3201
-
3202
-
3203
-
3204
- <div class="method-description"><p>Returns the tree for all test files namespaced to a given addon.</p>
3205
- </div>
3206
-
3207
- <div class="params">
3208
- <h4>Parameters:</h4>
3209
- <table>
3210
- <thead>
3211
- <tr>
3212
- <th>Name</th>
3213
- <th>Type</th>
3214
- <th>Attribute</th>
3215
- <th>Description</th>
3216
- </tr>
3217
- </thead>
3218
- <tbody>
3219
- <tr>
3220
- <td>tree</td>
3221
- <td>Tree</td>
3222
- <td>
3223
- <ul>
3224
-
3225
-
3226
-
3227
- </ul>
3228
- </td>
3229
- <td> </td>
3230
- </tr>
3231
-
3232
- </tbody>
3233
- </table>
3234
- </div>
3235
-
3236
- <div class="return">
3237
- <h4>Return:</h4>
3238
- <div>
3239
- <span class="return-type">Tree</span>
3240
- <span class="return-description"></span>
3241
- </div>
3242
- </div>
3243
-
3244
-
3245
- </div>
3246
- <div class="method item public">
3247
- <div id="method_treeForApp" class="title">
3248
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l792"><code>lib&#x2F;models&#x2F;addon.js:792</code></a></span>
3249
- <h3 class="">
3250
- public
3251
-
3252
-
3253
- treeForApp(tree): Tree
3254
- </h3>
3255
- </div>
3256
-
3257
-
3258
-
3259
- <div class="method-description"><p>Returns the tree for all app files</p>
3260
- </div>
3261
-
3262
- <div class="params">
3263
- <h4>Parameters:</h4>
3264
- <table>
3265
- <thead>
3266
- <tr>
3267
- <th>Name</th>
3268
- <th>Type</th>
3269
- <th>Attribute</th>
3270
- <th>Description</th>
3271
- </tr>
3272
- </thead>
3273
- <tbody>
3274
- <tr>
3275
- <td>tree</td>
3276
- <td>Tree</td>
3277
- <td>
3278
- <ul>
3279
-
3280
-
3281
-
3282
- </ul>
3283
- </td>
3284
- <td> </td>
3285
- </tr>
3286
-
3287
- </tbody>
3288
- </table>
3289
- </div>
3290
-
3291
- <div class="return">
3292
- <h4>Return:</h4>
3293
- <div>
3294
- <span class="return-type">Tree</span>
3295
- <span class="return-description"><p>App file tree</p>
3296
- </span>
3297
- </div>
3298
- </div>
3299
-
3300
-
3301
- </div>
3302
- <div class="method item public">
3303
- <div id="method_treeForPublic" class="title">
3304
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l905"><code>lib&#x2F;models&#x2F;addon.js:905</code></a></span>
3305
- <h3 class="">
3306
- public
3307
-
3308
-
3309
- treeForPublic(tree): Tree
3310
- </h3>
3311
- </div>
3312
-
3313
-
3314
-
3315
- <div class="method-description"><p>Returns the tree for all public files</p>
3316
- </div>
3317
-
3318
- <div class="params">
3319
- <h4>Parameters:</h4>
3320
- <table>
3321
- <thead>
3322
- <tr>
3323
- <th>Name</th>
3324
- <th>Type</th>
3325
- <th>Attribute</th>
3326
- <th>Description</th>
3327
- </tr>
3328
- </thead>
3329
- <tbody>
3330
- <tr>
3331
- <td>tree</td>
3332
- <td>Tree</td>
3333
- <td>
3334
- <ul>
3335
-
3336
-
3337
-
3338
- </ul>
3339
- </td>
3340
- <td> </td>
3341
- </tr>
3342
-
3343
- </tbody>
3344
- </table>
3345
- </div>
3346
-
3347
- <div class="return">
3348
- <h4>Return:</h4>
3349
- <div>
3350
- <span class="return-type">Tree</span>
3351
- <span class="return-description"><p>Public file tree</p>
3352
- </span>
3353
- </div>
3354
- </div>
3355
-
3356
-
3357
- </div>
3358
- <div class="method item public">
3359
- <div id="method_treeForStyles" class="title">
3360
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l862"><code>lib&#x2F;models&#x2F;addon.js:862</code></a></span>
3361
- <h3 class="">
3362
- public
3363
-
3364
-
3365
- treeForStyles(tree): Tree
3366
- </h3>
3367
- </div>
3368
-
3369
-
3370
-
3371
- <div class="method-description"><p>Returns the tree for all style files</p>
3372
- </div>
3373
-
3374
- <div class="params">
3375
- <h4>Parameters:</h4>
3376
- <table>
3377
- <thead>
3378
- <tr>
3379
- <th>Name</th>
3380
- <th>Type</th>
3381
- <th>Attribute</th>
3382
- <th>Description</th>
3383
- </tr>
3384
- </thead>
3385
- <tbody>
3386
- <tr>
3387
- <td>tree</td>
3388
- <td>Tree</td>
3389
- <td>
3390
- <ul>
3391
-
3392
-
3393
-
3394
- </ul>
3395
- </td>
3396
- <td><p>The tree to process, usually <code>app/styles/</code> in the addon.</p>
3397
- </td>
3398
- </tr>
3399
-
3400
- </tbody>
3401
- </table>
3402
- </div>
3403
-
3404
- <div class="return">
3405
- <h4>Return:</h4>
3406
- <div>
3407
- <span class="return-type">Tree</span>
3408
- <span class="return-description"><p>The return tree has the same contents as the input tree, but is moved so that the <code>app/styles/</code> path is preserved.</p>
3409
- </span>
3410
- </div>
3411
- </div>
3412
-
3413
-
3414
- </div>
3415
- <div class="method item public">
3416
- <div id="method_treeForTemplates" class="title">
3417
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l804"><code>lib&#x2F;models&#x2F;addon.js:804</code></a></span>
3418
- <h3 class="">
3419
- public
3420
-
3421
-
3422
- treeForTemplates(tree): Tree
3423
- </h3>
3424
- </div>
3425
-
3426
-
3427
-
3428
- <div class="method-description"><p>Returns the tree for all template files</p>
3429
- </div>
3430
-
3431
- <div class="params">
3432
- <h4>Parameters:</h4>
3433
- <table>
3434
- <thead>
3435
- <tr>
3436
- <th>Name</th>
3437
- <th>Type</th>
3438
- <th>Attribute</th>
3439
- <th>Description</th>
3440
- </tr>
3441
- </thead>
3442
- <tbody>
3443
- <tr>
3444
- <td>tree</td>
3445
- <td>Tree</td>
3446
- <td>
3447
- <ul>
3448
-
3449
-
3450
-
3451
- </ul>
3452
- </td>
3453
- <td> </td>
3454
- </tr>
3455
-
3456
- </tbody>
3457
- </table>
3458
- </div>
3459
-
3460
- <div class="return">
3461
- <h4>Return:</h4>
3462
- <div>
3463
- <span class="return-type">Tree</span>
3464
- <span class="return-description"><p>Template file tree</p>
3465
- </span>
3466
- </div>
3467
- </div>
3468
-
3469
-
3470
- </div>
3471
- <div class="method item public">
3472
- <div id="method_treeForTestSupport" class="title">
3473
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l893"><code>lib&#x2F;models&#x2F;addon.js:893</code></a></span>
3474
- <h3 class="">
3475
- public
3476
-
3477
-
3478
- treeForTestSupport(tree): Tree
3479
- </h3>
3480
- </div>
3481
-
3482
-
3483
-
3484
- <div class="method-description"><p>Returns the tree for all test support files</p>
3485
- </div>
3486
-
3487
- <div class="params">
3488
- <h4>Parameters:</h4>
3489
- <table>
3490
- <thead>
3491
- <tr>
3492
- <th>Name</th>
3493
- <th>Type</th>
3494
- <th>Attribute</th>
3495
- <th>Description</th>
3496
- </tr>
3497
- </thead>
3498
- <tbody>
3499
- <tr>
3500
- <td>tree</td>
3501
- <td>Tree</td>
3502
- <td>
3503
- <ul>
3504
-
3505
-
3506
-
3507
- </ul>
3508
- </td>
3509
- <td> </td>
3510
- </tr>
3511
-
3512
- </tbody>
3513
- </table>
3514
- </div>
3515
-
3516
- <div class="return">
3517
- <h4>Return:</h4>
3518
- <div>
3519
- <span class="return-type">Tree</span>
3520
- <span class="return-description"><p>Test Support file tree</p>
3521
- </span>
3522
- </div>
3523
- </div>
3524
-
3525
-
3526
- </div>
3527
- <div class="method item public">
3528
- <div id="method_treeForVendor" class="title">
3529
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l881"><code>lib&#x2F;models&#x2F;addon.js:881</code></a></span>
3530
- <h3 class="">
3531
- public
3532
-
3533
-
3534
- treeForVendor(tree): Tree
3535
- </h3>
3536
- </div>
3537
-
3538
-
3539
-
3540
- <div class="method-description"><p>Returns the tree for all vendor files</p>
3541
- </div>
3542
-
3543
- <div class="params">
3544
- <h4>Parameters:</h4>
3545
- <table>
3546
- <thead>
3547
- <tr>
3548
- <th>Name</th>
3549
- <th>Type</th>
3550
- <th>Attribute</th>
3551
- <th>Description</th>
3552
- </tr>
3553
- </thead>
3554
- <tbody>
3555
- <tr>
3556
- <td>tree</td>
3557
- <td>Tree</td>
3558
- <td>
3559
- <ul>
3560
-
3561
-
3562
-
3563
- </ul>
3564
- </td>
3565
- <td> </td>
3566
- </tr>
3567
-
3568
- </tbody>
3569
- </table>
3570
- </div>
3571
-
3572
- <div class="return">
3573
- <h4>Return:</h4>
3574
- <div>
3575
- <span class="return-type">Tree</span>
3576
- <span class="return-description"><p>Vendor file tree</p>
3577
- </span>
3578
- </div>
3579
- </div>
3580
-
3581
-
3582
- </div>
3583
- </div>
3584
-
3585
-
3586
- <div id="methods private">
3587
- <h2 id="private-methods">Private Methods</h2>
3588
- <div class="method item private">
3589
- <div id="method__eachProjectAddonInvoke" class="title">
3590
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l506"><code>lib&#x2F;models&#x2F;addon.js:506</code></a></span>
3591
- <h3 class="">
3592
- private
3593
-
3594
-
3595
- _eachProjectAddonInvoke(methodName, args)
3596
- </h3>
3597
- </div>
3598
-
3599
-
3600
-
3601
- <div class="method-description"><p>Invoke the specified method for each of the project's addons.</p>
3602
- </div>
3603
-
3604
- <div class="params">
3605
- <h4>Parameters:</h4>
3606
- <table>
3607
- <thead>
3608
- <tr>
3609
- <th>Name</th>
3610
- <th>Type</th>
3611
- <th>Attribute</th>
3612
- <th>Description</th>
3613
- </tr>
3614
- </thead>
3615
- <tbody>
3616
- <tr>
3617
- <td>methodName</td>
3618
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></td>
3619
- <td>
3620
- <ul>
3621
-
3622
-
3623
-
3624
- </ul>
3625
- </td>
3626
- <td><p>the method to invoke on each addon</p>
3627
- </td>
3628
- </tr>
3629
-
3630
- <tr>
3631
- <td>args</td>
3632
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a></td>
3633
- <td>
3634
- <ul>
3635
-
3636
-
3637
-
3638
- </ul>
3639
- </td>
3640
- <td><p>the arguments to pass to the invoked method</p>
3641
- </td>
3642
- </tr>
3643
-
3644
- </tbody>
3645
- </table>
3646
- </div>
3647
-
3648
-
3649
-
3650
- </div>
3651
- <div class="method item private">
3652
- <div id="method__findHost" class="title">
3653
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l716"><code>lib&#x2F;models&#x2F;addon.js:716</code></a></span>
3654
- <h3 class="">
3655
- private
3656
-
3657
-
3658
- _findHost( )
3659
- </h3>
3660
- </div>
3661
-
3662
-
3663
-
3664
- <div class="method-description"><p>This method climbs up the hierarchy of addons
3665
- up to the host application.</p>
3666
- <p>This prevents previous addons (prior to <code>this.import</code>, ca 2.7.0)
3667
- to break at importing assets when they are used nested in other addons.</p>
3668
- </div>
3669
-
3670
-
3671
-
3672
-
3673
- </div>
3674
- <div class="method item private">
3675
- <div id="method__shouldCompilePodTemplates" class="title">
3676
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1000"><code>lib&#x2F;models&#x2F;addon.js:1000</code></a></span>
3677
- <h3 class="">
3678
- private
3679
-
3680
-
3681
- _shouldCompilePodTemplates( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
3682
- </h3>
3683
- </div>
3684
-
3685
-
3686
-
3687
- <div class="method-description"><p>Looks in the addon/ and addon/templates trees to determine if template files
3688
- exist in the pods format that need to be precompiled.</p>
3689
- <p>This is executed once when building, but not on rebuilds.</p>
3690
- </div>
3691
-
3692
-
3693
- <div class="return">
3694
- <h4>Return:</h4>
3695
- <div>
3696
- <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>
3697
- <span class="return-description"><p>indicates if pod based templates need to be compiled for this addon</p>
3698
- </span>
3699
- </div>
3700
- </div>
3701
-
3702
-
3703
- </div>
3704
- <div class="method item private">
3705
- <div id="method__treeFor" class="title">
3706
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l652"><code>lib&#x2F;models&#x2F;addon.js:652</code></a></span>
3707
- <h3 class="">
3708
- private
3709
-
3710
-
3711
- _treeFor(name): Tree
3712
- </h3>
3713
- </div>
3714
-
3715
-
3716
-
3717
- <div class="method-description"></div>
3718
-
3719
- <div class="params">
3720
- <h4>Parameters:</h4>
3721
- <table>
3722
- <thead>
3723
- <tr>
3724
- <th>Name</th>
3725
- <th>Type</th>
3726
- <th>Attribute</th>
3727
- <th>Description</th>
3728
- </tr>
3729
- </thead>
3730
- <tbody>
3731
- <tr>
3732
- <td>name</td>
3733
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></td>
3734
- <td>
3735
- <ul>
3736
-
3737
-
3738
-
3739
- </ul>
3740
- </td>
3741
- <td> </td>
3742
- </tr>
3743
-
3744
- </tbody>
3745
- </table>
3746
- </div>
3747
-
3748
- <div class="return">
3749
- <h4>Return:</h4>
3750
- <div>
3751
- <span class="return-type">Tree</span>
3752
- <span class="return-description"></span>
3753
- </div>
3754
- </div>
3755
-
3756
-
3757
- </div>
3758
- <div class="method item private">
3759
- <div id="method__warn" class="title">
3760
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l574"><code>lib&#x2F;models&#x2F;addon.js:574</code></a></span>
3761
- <h3 class="">
3762
- private
3763
-
3764
-
3765
- _warn( )
3766
- </h3>
3767
- </div>
3768
-
3769
-
3770
-
3771
- <div class="method-description"></div>
3772
-
3773
-
3774
-
3775
-
3776
- </div>
3777
- <div class="method item private">
3778
- <div id="method_addonJsFiles" class="title">
3779
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1272"><code>lib&#x2F;models&#x2F;addon.js:1272</code></a></span>
3780
- <h3 class="deprecated">
3781
- private
3782
-
3783
-
3784
- addonJsFiles( ): Tree
3785
- </h3>
3786
- </div>
3787
-
3788
-
3789
- <div class="deprecation-message">
3790
- <p><strong>Deprecated:</strong> This method is deprecated.</p>
3791
- </div>
3792
-
3793
- <div class="method-description"><p>Returns a tree containing the addon's js files</p>
3794
- </div>
3795
-
3796
-
3797
- <div class="return">
3798
- <h4>Return:</h4>
3799
- <div>
3800
- <span class="return-type">Tree</span>
3801
- <span class="return-description"><p>The filtered addon js files</p>
3802
- </span>
3803
- </div>
3804
- </div>
3805
-
3806
-
3807
- </div>
3808
- <div class="method item private">
3809
- <div id="method_compileAddon" class="title">
3810
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1152"><code>lib&#x2F;models&#x2F;addon.js:1152</code></a></span>
3811
- <h3 class="">
3812
- private
3813
-
3814
-
3815
- compileAddon(tree): Tree
3816
- </h3>
3817
- </div>
3818
-
3819
-
3820
-
3821
- <div class="method-description"><p>Runs the addon tree through preprocessors.</p>
3822
- </div>
3823
-
3824
- <div class="params">
3825
- <h4>Parameters:</h4>
3826
- <table>
3827
- <thead>
3828
- <tr>
3829
- <th>Name</th>
3830
- <th>Type</th>
3831
- <th>Attribute</th>
3832
- <th>Description</th>
3833
- </tr>
3834
- </thead>
3835
- <tbody>
3836
- <tr>
3837
- <td>tree</td>
3838
- <td>Tree</td>
3839
- <td>
3840
- <ul>
3841
-
3842
-
3843
-
3844
- </ul>
3845
- </td>
3846
- <td><p>Addon file tree</p>
3847
- </td>
3848
- </tr>
3849
-
3850
- </tbody>
3851
- </table>
3852
- </div>
3853
-
3854
- <div class="return">
3855
- <h4>Return:</h4>
3856
- <div>
3857
- <span class="return-type">Tree</span>
3858
- <span class="return-description"><p>Compiled addon tree</p>
3859
- </span>
3860
- </div>
3861
- </div>
3862
-
3863
-
3864
- </div>
3865
- <div class="method item private">
3866
- <div id="method_compileStyles" class="title">
3867
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l961"><code>lib&#x2F;models&#x2F;addon.js:961</code></a></span>
3868
- <h3 class="">
3869
- private
3870
-
3871
-
3872
- compileStyles(addonStylesTree): Tree
3873
- </h3>
3874
- </div>
3875
-
3876
-
3877
-
3878
- <div class="method-description"><p>Runs the styles tree through preprocessors.</p>
3879
- </div>
3880
-
3881
- <div class="params">
3882
- <h4>Parameters:</h4>
3883
- <table>
3884
- <thead>
3885
- <tr>
3886
- <th>Name</th>
3887
- <th>Type</th>
3888
- <th>Attribute</th>
3889
- <th>Description</th>
3890
- </tr>
3891
- </thead>
3892
- <tbody>
3893
- <tr>
3894
- <td>addonStylesTree</td>
3895
- <td>Tree</td>
3896
- <td>
3897
- <ul>
3898
-
3899
-
3900
-
3901
- </ul>
3902
- </td>
3903
- <td><p>Styles file tree</p>
3904
- </td>
3905
- </tr>
3906
-
3907
- </tbody>
3908
- </table>
3909
- </div>
3910
-
3911
- <div class="return">
3912
- <h4>Return:</h4>
3913
- <div>
3914
- <span class="return-type">Tree</span>
3915
- <span class="return-description"><p>Compiled styles tree</p>
3916
- </span>
3917
- </div>
3918
- </div>
3919
-
3920
-
3921
- </div>
3922
- <div class="method item private">
3923
- <div id="method_compileTemplates" class="title">
3924
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1118"><code>lib&#x2F;models&#x2F;addon.js:1118</code></a></span>
3925
- <h3 class="">
3926
- private
3927
-
3928
-
3929
- compileTemplates(tree): Tree
3930
- </h3>
3931
- </div>
3932
-
3933
-
3934
-
3935
- <div class="method-description"><p>Runs the templates tree through preprocessors.</p>
3936
- </div>
3937
-
3938
- <div class="params">
3939
- <h4>Parameters:</h4>
3940
- <table>
3941
- <thead>
3942
- <tr>
3943
- <th>Name</th>
3944
- <th>Type</th>
3945
- <th>Attribute</th>
3946
- <th>Description</th>
3947
- </tr>
3948
- </thead>
3949
- <tbody>
3950
- <tr>
3951
- <td>tree</td>
3952
- <td>Tree</td>
3953
- <td>
3954
- <ul>
3955
-
3956
-
3957
-
3958
- </ul>
3959
- </td>
3960
- <td><p>Templates file tree</p>
3961
- </td>
3962
- </tr>
3963
-
3964
- </tbody>
3965
- </table>
3966
- </div>
3967
-
3968
- <div class="return">
3969
- <h4>Return:</h4>
3970
- <div>
3971
- <span class="return-type">Tree</span>
3972
- <span class="return-description"><p>Compiled templates tree</p>
3973
- </span>
3974
- </div>
3975
- </div>
3976
-
3977
-
3978
- </div>
3979
- <div class="method item private">
3980
- <div id="method_concatFiles" class="title">
3981
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l379"><code>lib&#x2F;models&#x2F;addon.js:379</code></a></span>
3982
- <h3 class="">
3983
- private
3984
-
3985
-
3986
- concatFiles(tree, options): Tree
3987
- </h3>
3988
- </div>
3989
-
3990
-
3991
-
3992
- <div class="method-description"><p>Shorthand method for <a href="https://github.com/ember-cli/broccoli-concat">broccoli-concat</a></p>
3993
- </div>
3994
-
3995
- <div class="params">
3996
- <h4>Parameters:</h4>
3997
- <table>
3998
- <thead>
3999
- <tr>
4000
- <th>Name</th>
4001
- <th>Type</th>
4002
- <th>Attribute</th>
4003
- <th>Description</th>
4004
- </tr>
4005
- </thead>
4006
- <tbody>
4007
- <tr>
4008
- <td>tree</td>
4009
- <td>Tree</td>
4010
- <td>
4011
- <ul>
4012
-
4013
-
4014
-
4015
- </ul>
4016
- </td>
4017
- <td><p>Tree of files</p>
4018
- </td>
4019
- </tr>
4020
-
4021
- <tr>
4022
- <td>options</td>
4023
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
4024
- <td>
4025
- <ul>
4026
-
4027
-
4028
-
4029
- </ul>
4030
- </td>
4031
- <td><p>Options for broccoli-concat</p>
4032
- </td>
4033
- </tr>
4034
-
4035
- </tbody>
4036
- </table>
4037
- </div>
4038
-
4039
- <div class="return">
4040
- <h4>Return:</h4>
4041
- <div>
4042
- <span class="return-type">Tree</span>
4043
- <span class="return-description"><p>Modified tree</p>
4044
- </span>
4045
- </div>
4046
- </div>
4047
-
4048
-
4049
- </div>
4050
- <div class="method item private">
4051
- <div id="method_discoverAddons" class="title">
4052
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l431"><code>lib&#x2F;models&#x2F;addon.js:431</code></a></span>
4053
- <h3 class="">
4054
- private
4055
-
4056
-
4057
- discoverAddons( )
4058
- </h3>
4059
- </div>
4060
-
4061
-
4062
-
4063
- <div class="method-description"><p>Discovers all child addons of this addon and an AddonInfo about
4064
- each addon in this.addonPackages (keyed on addon name).</p>
4065
- <p>Child addons include those from 'dependencies' (not devDependencies)
4066
- and in-repo addons</p>
4067
- <p>Any packageInfos that we find that are marked as not valid are excluded.</p>
4068
- </div>
4069
-
4070
-
4071
-
4072
-
4073
- </div>
4074
- <div class="method item private">
4075
- <div id="method_eachAddonInvoke" class="title">
4076
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l481"><code>lib&#x2F;models&#x2F;addon.js:481</code></a></span>
4077
- <h3 class="">
4078
- private
4079
-
4080
-
4081
- eachAddonInvoke(methodName, args)
4082
- </h3>
4083
- </div>
4084
-
4085
-
4086
-
4087
- <div class="method-description"><p>Invoke the specified method for each enabled addon.</p>
4088
- </div>
4089
-
4090
- <div class="params">
4091
- <h4>Parameters:</h4>
4092
- <table>
4093
- <thead>
4094
- <tr>
4095
- <th>Name</th>
4096
- <th>Type</th>
4097
- <th>Attribute</th>
4098
- <th>Description</th>
4099
- </tr>
4100
- </thead>
4101
- <tbody>
4102
- <tr>
4103
- <td>methodName</td>
4104
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></td>
4105
- <td>
4106
- <ul>
4107
-
4108
-
4109
-
4110
- </ul>
4111
- </td>
4112
- <td><p>the method to invoke on each addon</p>
4113
- </td>
4114
- </tr>
4115
-
4116
- <tr>
4117
- <td>args</td>
4118
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a></td>
4119
- <td>
4120
- <ul>
4121
-
4122
-
4123
-
4124
- </ul>
4125
- </td>
4126
- <td><p>the arguments to pass to the invoked method</p>
4127
- </td>
4128
- </tr>
4129
-
4130
- </tbody>
4131
- </table>
4132
- </div>
4133
-
4134
-
4135
-
4136
- </div>
4137
- <div class="method item private">
4138
- <div id="method_jshintAddonTree" class="title">
4139
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1206"><code>lib&#x2F;models&#x2F;addon.js:1206</code></a></span>
4140
- <h3 class="">
4141
- private
4142
-
4143
-
4144
- jshintAddonTree( ): Tree
4145
- </h3>
4146
- </div>
4147
-
4148
-
4149
-
4150
- <div class="method-description"><p>Returns a tree with JSHint output for all addon JS.</p>
4151
- </div>
4152
-
4153
-
4154
- <div class="return">
4155
- <h4>Return:</h4>
4156
- <div>
4157
- <span class="return-type">Tree</span>
4158
- <span class="return-description"><p>Tree with JShint output (tests)</p>
4159
- </span>
4160
- </div>
4161
- </div>
4162
-
4163
-
4164
- </div>
4165
- <div class="method item private">
4166
- <div id="method_preprocessJs" class="title">
4167
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1289"><code>lib&#x2F;models&#x2F;addon.js:1289</code></a></span>
4168
- <h3 class="">
4169
- private
4170
-
4171
-
4172
- preprocessJs( ): Tree
4173
- </h3>
4174
- </div>
4175
-
4176
-
4177
-
4178
- <div class="method-description"><p>Preprocesses a javascript tree.</p>
4179
- </div>
4180
-
4181
-
4182
- <div class="return">
4183
- <h4>Return:</h4>
4184
- <div>
4185
- <span class="return-type">Tree</span>
4186
- <span class="return-description"><p>Preprocessed javascript</p>
4187
- </span>
4188
- </div>
4189
- </div>
4190
-
4191
-
4192
- </div>
4193
- <div class="method item private">
4194
- <div id="method_processedAddonJsFiles" class="title">
4195
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l1300"><code>lib&#x2F;models&#x2F;addon.js:1300</code></a></span>
4196
- <h3 class="">
4197
- private
4198
-
4199
-
4200
- processedAddonJsFiles(the): Tree
4201
- </h3>
4202
- </div>
4203
-
4204
-
4205
-
4206
- <div class="method-description"><p>Returns a tree with all javascript for this addon.</p>
4207
- </div>
4208
-
4209
- <div class="params">
4210
- <h4>Parameters:</h4>
4211
- <table>
4212
- <thead>
4213
- <tr>
4214
- <th>Name</th>
4215
- <th>Type</th>
4216
- <th>Attribute</th>
4217
- <th>Description</th>
4218
- </tr>
4219
- </thead>
4220
- <tbody>
4221
- <tr>
4222
- <td>the</td>
4223
- <td>Tree</td>
4224
- <td>
4225
- <ul>
4226
-
4227
-
4228
-
4229
- </ul>
4230
- </td>
4231
- <td><p>tree to preprocess</p>
4232
- </td>
4233
- </tr>
4234
-
4235
- </tbody>
4236
- </table>
4237
- </div>
4238
-
4239
- <div class="return">
4240
- <h4>Return:</h4>
4241
- <div>
4242
- <span class="return-type">Tree</span>
4243
- <span class="return-description"><p>Processed javascript file tree</p>
4244
- </span>
4245
- </div>
4246
- </div>
4247
-
4248
-
4249
- </div>
4250
- <div class="method item private">
4251
- <div id="method_shouldCompileTemplates" class="title">
4252
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l986"><code>lib&#x2F;models&#x2F;addon.js:986</code></a></span>
4253
- <h3 class="">
4254
- private
4255
-
4256
-
4257
- shouldCompileTemplates( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
4258
- </h3>
4259
- </div>
4260
-
4261
-
4262
-
4263
- <div class="method-description"><p>Looks in the addon/ and addon/templates trees to determine if template files
4264
- exist that need to be precompiled.</p>
4265
- <p>This is executed once when building, but not on rebuilds.</p>
4266
- </div>
4267
-
4268
-
4269
- <div class="return">
4270
- <h4>Return:</h4>
4271
- <div>
4272
- <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>
4273
- <span class="return-description"><p>indicates if templates need to be compiled for this addon</p>
4274
- </span>
4275
- </div>
4276
- </div>
4277
-
4278
-
4279
- </div>
4280
- <div class="method item private">
4281
- <div id="method_treeGenerator" class="title">
4282
- <span class="source-link"><a href="../files/lib_models_addon.js.html#l539"><code>lib&#x2F;models&#x2F;addon.js:539</code></a></span>
4283
- <h3 class="">
4284
- private
4285
-
4286
-
4287
- treeGenerator( ): Tree
4288
- </h3>
4289
- </div>
4290
-
4291
-
4292
-
4293
- <div class="method-description"><p>Generates a tree for the specified path</p>
4294
- </div>
4295
-
4296
-
4297
- <div class="return">
4298
- <h4>Return:</h4>
4299
- <div>
4300
- <span class="return-type">Tree</span>
4301
- <span class="return-description"></span>
4302
- </div>
4303
- </div>
4304
-
4305
-
4306
- </div>
4307
- </div>
4308
-
4309
-
4310
- </div>
4311
- </div>
4312
- </div>
4313
- </div>
4314
- <script src="../assets/vendor/prettify/prettify-min.js"></script>
4315
- <script>prettyPrint();</script>
4316
- <script src="../assets/js/yui-prettify.js"></script>
4317
- </body>
4318
- </html>