Implement a simple asset library and use it

This commit is contained in:
Eike Foken
2011-09-02 04:34:16 +02:00
parent 20a1ea85b3
commit 554edb1f0c
8 changed files with 472 additions and 15 deletions

View File

@@ -0,0 +1,27 @@
<?php defined('BASEPATH') || exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Asset storage
|--------------------------------------------------------------------------
|
| The path to where the assets are stored, WITH trailing slash.
|
*/
$config['assets_folder'] = 'assets/';
$config['cache_folder'] = $config['assets_folder'] . 'cache/';
/*
|--------------------------------------------------------------------------
| Toggle CSSTidy/JSMin compression
|--------------------------------------------------------------------------
|
| Whether to run compression using CSSTidy or JSMin.
|
*/
$config['enable_csstidy'] = true;
$config['enable_jsmin'] = true;
/* End of file assets.php */
/* Location: ./application/config/assets.php */

View File

@@ -1,4 +1,4 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
<?php defined('BASEPATH') || exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| AUTO-LOADER
@@ -64,7 +64,7 @@ $autoload['libraries'] = array('session', 'lang_detect', 'database', 'access', '
| $autoload['helper'] = array('url', 'file');
*/
$autoload['helper'] = array('date', 'url', 'html', 'language', 'hash');
$autoload['helper'] = array('date', 'url', 'form', 'language', 'hash', 'asset');
/*