RapidApp::Manual::Assets - Asset handling in RapidApp (CSS, JS, Images, etc.)
RapidApp uses Catalyst::Controller::AutoAssets internally to manage and serve built-in asset files as well as provide mechanisms for additional user-defined and application-specific assets.
RapidApp automatically loads a set of Catalyst::Controller::AutoAssets controllers during startup, and associated html head/include tags are inserted in content/templates in appropriate locations as well.
Built-in, and optional local and custom asset controllers are automatically setup as described below.
The built-in assets are the same for every RapidApp application. This list of controllers is for reference purposes only, as there is nothing that can be changed or configured about the built-in assets.
Directory asset controller for the ExtJS sources.
CSS asset controller for built-in RapidApp stylesheets.
JS asset controller for built-in RapidApp javascripts.
IconSet asset controller for built-in RapidApp icons. icon_name_prefix for the built-in icons is set to ra-icon-. See Catalyst::Controller::AutoAssets::Handler::IconSet for more info on the IconSet asset type.
ra-icon-
Special asset handling RapidApp 'filelinks' (links embedded in various CMS/ HtmlEditor content locations) - will be removed/consolidated in the future.
Directory asset controller for additional, miscellaneous static files needed by RapidApp
Additionally, the following asset controllers are also auto configured based on the existance of specific directories within the application root:
Setup if local directory exists: root/assets/css
CSS asset controller for local stylesheets.
Setup if local directory exists: root/assets/js
JS asset controller for local javascripts.
Setup if local directory exists: root/assets/icons
IconSet asset controller for local icons. icon_name_prefix is set to icon-. Each image file found within the local app directory root/assets/icons will be setup and available as a CSS icon class (compatible with the ExtJS config 'iconCls'). For example, the image 'apple.png' will get the CSS class name 'icon-apple'.
icon-
See Catalyst::Controller::AutoAssets::Handler::IconSet for more info on the IconSet asset type.
Setup if local directory exists: root/assets/misc
Directory asset controller for additional, miscellaneous static files.
The allow_static_requests option is enabled so files within this directory can be accessed via static URL path /assets/local/misc/static/*. This is basically like Static::Simple but with the extra benefits of AutoAssets. Note that for deployment, this static URL prefix can be aliased (such as with the Alias Apache directive) in the web server config in exactly the same way as Catalyst docs describe for Static::Simple, if desired.
/assets/local/misc/static/*
Alias
See Catalyst::Controller::AutoAssets::Handler::Directory for more info on the Directory asset type.
Extra/custom AutoAsset controllers with specific configs can also be setup by specifying a list of controller configs in the Catalyst config param {'Plugin::AutoAssets'}->{assets}.
See Catalyst::Plugin::AutoAssets for details.
Also note that custom application controllers can also always be setup as normal Catalyst controllers. The above config options are just convenience mechanisms that cover 99% of cases. =head1 SEE ALSO
RapidApp::Manual
To install RapidApp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RapidApp
CPAN shell
perl -MCPAN -e shell install RapidApp
For more information on module installation, please visit the detailed CPAN module installation guide.