Defined in: lib/Assets.js
A registry for all static assets that need to be present at run-time, like stylesheets, JavaScript scripts, image files, or whatever.
Assets can be accessed by their original path prefixed by /assets/
. For
example, for an image found at doc/images/lol.jpg
, it can be referenced in
the sources at /assets/doc/images/lol.jpg
.
void | add(String, String) |
void | addStyleSheet() |
void | addRuntimeScript(String) |
Add a static file (or directory) to the asset listing.
path | String The path of the asset relative to the Config@assetRoot. This can either be a path to a single file, or a directory of files. |
outputPath | String If present, you may specify an absolute path to where the asset should be copied (this will still be relative to the output directory, however.) When this is not present, we assume the output path to be the source path prefixed by "/assets/". |
Add a script that will be included by the resulting HTML file.
path | String The path relative to the HTML file to where the script will be located. Note that you are responsible to stage and copy the file yourself using something like AssetUtils#writeAsset. |
Made with ♥ using megadoc.