RSAddonYUI Class
Item Index
Methods
- _captureYUIModuleDetails
- _makeYUIModuleConfig
- _precalcLoaderMeta
- _precalcYUIResources
- _precomputeYUIDependencies
- _processMeta
- _produceMeta
- addResourceVersion
- addResourceVersion
- findResourceVersionByConvention
- getAppGroupConfig
- getAppSeedFiles
- getConfigShared
- getModulesConfig
- getResourceContent
- getYUIConfig
- getYUIURLDetails
- initializer
- parseResourceVersion
- resolveResourceVersions
Methods
_captureYUIModuleDetails
-
res
-
runSandbox
If the resource is a YUI module, augments its metadata with metadata about the YUI module.
Parameters:
-
res
Objectresource metadata
-
runSandbox
Objectif passed, the function in the module will be called using this parameter as the YUI sandbox
Returns:
_makeYUIModuleConfig
-
env
-
res
Generates the YUI configuration for the resource.
Parameters:
-
env
Stringruntime environment (either
client
, orserver
) -
res
Objectthe resource metadata
Returns:
_precalcLoaderMeta
-
langs
Precomputes YUI loader metadata, so that we don't have to at runtime.
Parameters:
-
langs
Arrayarray of languages for which to compute YUI loader metadata
Returns:
_precalcYUIResources
()
Nothing
private
Precomputes YUI modules resources, so that we don't have to at runtime.
Returns:
_precomputeYUIDependencies
-
lang
-
env
-
mojit
-
modules
-
required
-
forceYLoader
Precomputes a set of dependencies.
Parameters:
-
lang
StringYUI language code
-
env
Stringruntime environment (either
client
, orserver
) -
mojit
Stringname of the mojit
-
modules
ObjectYUI module metadata
-
required
Objectlookup hash of YUI module names that are required
-
forceYLoader
Booleanwhether to force the use of Y.Loader
Returns:
_processMeta
-
resolvedMods
-
modules
-
appModules
Parameters:
-
resolvedMods
Objectresolved module metadata, from Y.Loader.resolve()
-
modules
Objectregular YUI module metadata (ala loader-yui3)
-
appModules
Objecta hash table with the modules that are part of the app, use to correct paths when needed.
Returns:
_produceMeta
-
name
-
lang
-
appMetaData
Generates the final YUI metadata.
Parameters:
-
name
Stringtype of YUI metadata to return
-
lang
Stringwhich language the metadata should be customized for
-
appMetaData
Objectgathered YUI metadata for the application
Returns:
addResourceVersion
-
res
Using AOP, this is called before the ResourceStore's version. We register some fake resource versions that represent the YUI configurations.
Parameters:
-
res
Objectresource version metadata
Returns:
addResourceVersion
-
res
Using AOP, this is called before the ResourceStore's version. If the resource is a YUI module, augments the metadata with details about the YUI module.
Parameters:
-
res
Objectresource version metadata
Returns:
findResourceVersionByConvention
-
source
-
mojitType
Using AOP, this is called after the ResourceStore's version.
Parameters:
-
source
Objectmetadata about where the resource is located
-
mojitType
Stringname of mojit to which the resource likely belongs
Returns:
getAppGroupConfig
-
ctx
Hook to allow other RS addons to control the combo
handler configuration for group "app". By default,
the yui.config.groups.app
will allow customization
of the combo handler when needed from application.json
Parameters:
-
ctx
Objectthe context
Returns:
getAppSeedFiles
-
ctx
-
yuiConfig
Produce the YUI seed files. This can be controlled through application.json->yui->config->seed in a form of a array with the list of full paths for all seed files.
Parameters:
-
ctx
Objectthe context
-
yuiConfig
Objectthe config that is sent to client
Returns:
getModulesConfig
-
env
-
justApp
Returns a datastructure which tells a YUI instance where to find the YUI modules in the app.
Parameters:
-
env
Stringruntime environment (either
client
, orserver
) -
justApp
BooleanIndicates whether to include the YUI modules just found in the application (true), or also include those found in mojito (false).
Returns:
getResourceContent
-
details
-
callback
Return the content for resources we make in makeResourceVersions().
Parameters:
-
details
Objectstatic handling details
-
callback
Functioncallback used to return the resource content (or error)
-
err
Error | UndefinedError that occurred, if any. If an error is given that the other two arguments will be undefined.
-
content
Bufferthe contents of the resource
-
stat
Stat | | NullStat object with details about the file on the filesystem Can be null if the resource doesn't have a direct representation on the filesystem.
-
Returns:
getYUIConfig
-
ctx
Hook to allow other RS addons to control the yui
configuration. By default, the yui.config
will
allow customization of the combo handler when needed
from application.json
.
Parameters:
-
ctx
Objectthe context
Returns:
getYUIURLDetails
()
Object
private
Aggregate all yui core files using the path of as the hash.
Returns:
initializer
-
config
This methods is part of Y.Plugin.Base. See documentation for that for details.
Parameters:
-
config
ObjectConfiguration object as per Y.Plugin.Base
Returns:
parseResourceVersion
-
source
-
type
-
subtype
-
mojitType
Using AOP, this is called before the ResourceStore's version.
Parameters:
-
source
Objectmetadata about where the resource is located
-
type
Stringtype of the resource
-
subtype
Stringsubtype of the resource
-
mojitType
Stringname of mojit to which the resource likely belongs
Returns:
resolveResourceVersions
()
Nothing
Using AOP, this is called after the ResourceStore's version. We precompute the YUI configurations.