Add helper for asset_url. Add development mode.

This commit is contained in:
2015-04-05 18:45:36 +01:00
parent 5649869597
commit 9a72baec52
4 changed files with 206 additions and 32 deletions
+16
View File
@@ -24,6 +24,22 @@ To install this module, run the following commands:
make test
make install
##USAGE
Example usage:
In your base mojo class:
```perl
my $assets = File::Assets::Precompile->new(
'base_path' => $self->home . '/assets/',
'output_path' => $self->home . '/public/assets/',
'base_url' => '/assets/',
'development_mode' => 1,
);
$assets->copy_files();
$self->helper(
'asset_url' => sub { my $self = shift; $assets->asset_url(@_); }, );
```
##SUPPORT AND DOCUMENTATION
After installing, you can find documentation for this module with the