=head1 NAME
 
RapidApp::Manual::Assets - Asset handling in RapidApp (CSS, JS, Images, etc.)
 
=head1 DESCRIPTION
 
RapidApp uses L<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 L<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.

=head1 BUILT-IN ASSETS

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.

=head2 *::Controller::Assets::ExtJS (/assets/extjs)

Directory asset controller for the ExtJS sources.

=head2 *::Controller::Assets::RapidApp::CSS (/assets/rapidapp/css)

CSS asset controller for built-in RapidApp stylesheets.

=head2 *::Controller::Assets::RapidApp::JS (/assets/rapidapp/js)

JS asset controller for built-in RapidApp javascripts.

=head2 *::Controller::Assets::RapidApp::Icons (/assets/rapidapp/icons)

IconSet asset controller for built-in RapidApp icons. B<icon_name_prefix> 
for the built-in icons is set to C<ra-icon->. See 
L<Catalyst::Controller::AutoAssets::Handler::IconSet> for more info on 
the IconSet asset type.

=head2 *::Controller::Assets::RapidApp::Filelink (/assets/rapidapp/filelink)

Special asset handling RapidApp 'filelinks' (links embedded in various CMS/
HtmlEditor content locations) - will be removed/consolidated in the future.

=head2 *::Controller::Assets::RapidApp::Misc (/assets/rapidapp/misc)

Directory asset controller for additional, miscellaneous static files 
needed by RapidApp

=head1 LOCAL ASSETS

Additionally, the following asset controllers are also auto configured
based on the existance of specific directories within the application
root:

=head2 *::Controller::Assets::Local::CSS (/assets/local/css)

Setup if local directory exists: B<root/assets/css>

CSS asset controller for local stylesheets.

=head2 *::Controller::Assets::Local::JS (/assets/local/js)

Setup if local directory exists: B<root/assets/js>

JS asset controller for local javascripts.

=head2 *::Controller::Assets::Local::Icons (/assets/local/icons)

Setup if local directory exists: B<root/assets/icons>

IconSet asset controller for local icons. B<icon_name_prefix> is set to 
C<icon->. Each image file found within the local app directory B<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'.

See L<Catalyst::Controller::AutoAssets::Handler::IconSet> for more info on 
the IconSet asset type.

=head2 *::Controller::Assets::Local::Misc (/assets/local/misc)

Setup if local directory exists: B<root/assets/misc>

Directory asset controller for additional, miscellaneous static files.

The B<allow_static_requests> option is enabled so files within this
directory can be accessed via static URL path C</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 C<Alias> Apache directive) in the web server
config in exactly the same way as Catalyst docs describe for Static::Simple,
if desired.

See L<Catalyst::Controller::AutoAssets::Handler::Directory> for more info on 
the Directory asset type.


=head1 CUSTOM/ADDITIONAL ASSETS

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 L<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

=over

=item *

L<RapidApp::Manual>

=back
 
=cut
