funcunit
Version:
<!-- @hide title
72 lines (58 loc) • 1.99 kB
Markdown
{{}} load.metadata metadata
StealJS.types
An object that is passed between `Loader` hooks. Any values can be set. These are the ones that `steal.js` and
SystemJS recognize.
{String} format Specifies what type of Syntax is used. This can be specified like:
"format amd";
{Array.<moduleName>} [deps] Dependencies of this module. If the module is a global
but implicitly depends on another, like jQuery, add that dependency here.
```
"meta": {
"jquery-cookie": {
"deps": ["jquery"]
}
}
```
{String} [exports] The global property that is exported as this module's default export.
{function(this:Global,Module...)} [init] Allows for calling noConflict and
for other cleanup. `this` will be the global object.
{Boolean} [sideBundle=false] Create a bundle for this module and exclude it from
StealTool's bundle optimization algorithm. This is useful for modules that are infrequently
used, like a page for your app that users rarely visit.
```
"meta": {
"moduleA": {
"sideBundle": true
}
}
```
{Boolean} [bundle=false] Exclude a module from being bundled.
```
"meta": {
"MODULENAME": {
"bundle": false
}
}
```
If you exclude a module from the bundled file, you have to make sure, that in the [production environment configuration](http://stealjs.com/docs/System.envs.html)
the module is:
* ... [mapped to the pseudo-module ](http://stealjs.com/docs/System.map.html#ignoring-optional-dependencies)
```
"envs": {
"window-production": {
"map": {
"MODULENAME': ""
}
}
}
```
* ... [configured](http://stealjs.com/docs/steal.html#path-configure) to the [right location](http://stealjs.com/docs/System.paths.html) of the module e.g. a CDN
```
"envs": {
"production": {
"paths": {
"jquery': "//code.jquery.com/jquery-2.2.1.min.js"
}
}
}
```