If a moduleName matches one of the keys of the paths config, it is located
with at the value of the key.
If paths for @config, @dev, @traceur,
[$css], [$less], "bundles/*" and "bundles/*.css" are not set, steal.js
will provide default paths.
Use
paths can be configured with any of the approaches in config. It
is used to provide the path of a module. You might use this if you install a module
with a package manager, for example with npm:
Will map the the jquery module to where the JavaScript file is located in node_modules.
Wildcard paths
The * is used to denote wildcard paths. These allow substitution in cases where
you want a common pattern for referring to module names. A common example of this
would be a package where you want to load only certain modules and not the main
module.
See this issue on why css and other extensions have
strange rules.
Default paths configured by steal
If the following paths are not specified, steal.js will use a default path according
to the following rules:
@config - If steal.js is in ROOT/node_modules/steal/steal.js, @config defaults to
ROOT/stealconfig.js; otherwise, it defaults to
baseURL/stealconfig.js. Specifying @config will specify baseURL.
Use
paths
can be configured with any of the approaches in config. It is used to provide the path of a module. You might use this if you install a module with a package manager, for example with npm:Will map the the
jquery
module to where the JavaScript file is located in node_modules.Wildcard paths
The
*
is used to denote wildcard paths. These allow substitution in cases where you want a common pattern for referring to module names. A common example of this would be a package where you want to load only certain modules and not themain
module.For example:
This would allow you to do:
to load only the throttle function.
See this issue on why
css
and other extensions have strange rules.Default paths configured by steal
If the following paths are not specified,
steal.js
will use a default path according to the following rules:steal.js
is in ROOT/node_modules/steal/steal.js,@config
defaults to ROOT/stealconfig.js; otherwise, it defaults to baseURL/stealconfig.js. Specifying@config
will specify baseURL."bundles/*"
- defaults to "dist/bundles/*.js""bundles/*.css"
- defaults to "dist/bundles/*css"Note:
STEAL_BASE
is the parent folder of the steal folder.