NAME
CatalystX::Controller::Sugar::ActionPack::Merge - Merge static files
DESCRIPTION
Provides an action which can serve multiple files in one request. The reason for this is easier maintenance of css and js files, while having less request to the web server.
SAMPLE CONFIG FILE
<Controller::Root>
<merge> # <-- "js" from "/merge/foo.js"
<js>
content_type text/javascript
foo file1.js # <-- "foo" from "/merge/foo.js"
foo file2.js # <--/ /
foo file3.js # <---/
</js>
</merge>
</Controller::Root>
The example above requires this module to be injected into the Root controller.
ACTIONS
Endpoint /merge/*
go '/merge', [$virtual_file];
Will merge files from the static directory, based on requested path.
Example: Will serve "file1.js", "file2.js" and "file3.js", if $virtual_file
is "foo.js", based on the config from "SAMPLE CONFIG FILE".