-
Notifications
You must be signed in to change notification settings - Fork 15
Options
Previous: Usage
- enabled
- outputDir
- outputFileName
- useSelfClosingTags
- wrapScriptsInFunction
- treeTypes
- concat (extension specific)
- contentFor (extension specific)
- footer (extension specific)
- header (extension specific)
- preserveOriginal (extension specific)
- useAsync (only for javascript)
- preLoad (only for CSS)
- Default:
true
- Type: Boolean
Whether or not the addon should be enabled regardless or whether it's installed.
- Default:
'assets'
- Type: String
The directory to place asset files into.
- Default:
'app'
- Type: String
The name of the file in the outputDir
directory to save concatenated files as.
- Default:
false
- Type: Boolean
Whether or not to use self closing tags for <link rel="stylesheet" />
.
- Default:
false
- Type: Boolean
Whether or not to wrap the content of script files in a function.
- Default:
['all']
- Type: String[]
Asset concatenation would happen in postprocessTree
hook which is in turn ran by addonPostprocessTree
of EmberApp
. The addons postprocessTree
is ran for every tree type that normal app would generate: template
, js
, css
and additionally it would run for trees already merged by own ember-cli
pipeline (all
). The treeTypes
option specifies for which types of Broccoli trees asset concatenation should be ran. By default this addon properly handles trees of type all
which would include js
and css
assets in the input folder. For any other setting (example would be template
) the js
and css
files required by this addon, namely vendor.js
/vendor.css
and app-name.js
/app-name.css
might be not found in the addon input folder and ember-cli-concat
would raise a compile Error. Generally ember-cli-concat
is meant to be used with default option and apply its concatenation only to the tree of type all
which would usually include vendor.js
/vendor.css
and app-name.js
/app-name.css
that are required for this addon to function properly.
Extension specific (css.concat or js.concat)
- CSS Default:
false
- JS Default:
false
- Type: Boolean
Whether or not to concatenate the app-name
and vendor
files into a single file at <outputDir>/<outputFileName>.<extension>
.
Extension specific (css.contentFor or js.contentFor)
- CSS Default:
'concat-css'
- JS Default:
'concat-js'
- Type: String
The {{content-for}}
hook in app/index.html
to place the style or script tags.
Extension specific (css.footer or js.footer)
- CSS Default:
null
- JS Default:
null
- Type: String
A string to append to the start of each the concatenated file for the extension. Most likely you would use this for a comment containing copyright or owner info.
Extension specific (css.header or js.header)
- CSS Default:
null
- JS Default:
null
- Type: String
A string to append to the end of each the concatenated file for the extension. Most likely you would use this for a comment containing copyright or owner info.
Extension specific (css.preserveOriginal or js.preserveOriginal)
- CSS Default:
true
- JS Default:
true
- Type: Boolean
Whether or not to keep the original vendor
and app-name
file for each extension regardless of whether or not they are concatenated. This option is useful if you would like to concatenate files in a development environment but want to use the /tests
route for Ember testing.
Extension specific (js.useAsync)
- JS Default:
false
- Type: Boolean
Whether to use <script async>
.
Extension specific (js.useDefer)
- JS Default:
false
- Type: Boolean
Whether to use <script defer>
.
Extension specific (css.preLoad)
- CSS Default:
false
- Type: Boolean
Whether to use <link rel="preload">
.
Previous: Usage