PHP code example of mikehaertl / packagecompressor
1. Go to this page and download the library: Download mikehaertl/packagecompressor library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mikehaertl / packagecompressor example snippets
return array(
// ...
'clientScript' => array(
'class' => 'ext.packagecompressor.PackageCompressor'
'coreScriptPosition' => 2, // == POS_END
'packages' => array(
'forum-js' => array(
'baseUrl' => 'js',
'depends' => array('jQuery', 'maskedinput'),
'js' => array(
'modules/main.js',
'modules/editor.js',
'modules/forum.post.js',
'modules/forum.notify.js',
),
),
'forum-css' => array(
//
return array(
// ...
'components' => array(
'clientScript' => array(
'class' => 'ext.packagecompressor.PackageCompressor'
),
// ...
),
// ...
);
return array(
// ...
'commandMap' => array(
'packages' => array(
'class' => 'ext.packagecompressor.PackagesCommand',
),
// ...
),
// ...
);
>
> 'aliases' => array(
> 'webroot' => realpath(__DIR__.'/../..'),
> ),
> 'components' =>
> 'assetManager'=>array(
> 'class' =>'CAssetManager',
> 'basePath' =>realpath(__DIR__.'/../../assets'),
> 'baseUrl' =>'/assets',
> ),
> 'request' => array(
> 'baseUrl' => '',
> ),
> //...
>
return array(
// ...
'forum-css' => array(
'baseUrl' => 'css',
'css' => array(
'main.css',
'forum.css',
),
),
// ...
)
return array(
// ...
'main-css' => array(
'baseUrl' => 'css',
'media' => 'screen',
'css' => array(
'main.css',
'forum.css',
),
),
'main-css' => array(
'baseUrl' => 'css',
'media' => 'print',
'css' => array(
'print.css',
),
),
// ...
)
return array(
// ...
'clientScript' => array(
'class' => 'ext.packagecompressor.PackageCompressor'
'coreScriptPosition' => 2, // == POS_END
'scriptMap' => array(
'jquery.js' => 'https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.js',
),
'packages' => array(
'forum' => array(
'depends' => array('jQuery', 'maskedinput'),
'js' => array(
// ...
),
),
),
),
// ...
),