Implement a simple asset library and use it
This commit is contained in:
27
application/config/assets.php
Normal file
27
application/config/assets.php
Normal 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 */
|
||||
@@ -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');
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user