PHP code example of yanli0303 / yii-minify-client-script
1. Go to this page and download the library: Download yanli0303/yii-minify-client-script 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/ */
yanli0303 / yii-minify-client-script example snippets
return array(
'basePath' => __DIR__ . '/..',
'name' => 'Your App Name',
'preload' => array('log'),
'import' => array(
'application.models.*',
'application.components.*',
'application.extensions.*'
),
'clientScript' => array(
'class' => 'ext.minify.MinifyClientScript',
'minify' => !YII_DEBUG, // Disable minifying while developing
// put all js files before end </body> tag
// note this setting won't affect css files, they will be put in <head>
'coreScriptPosition' => CClientScript::POS_END,
'packages' => array(
'home_page' => array(
'baseUrl' => '',
'js' => array(
'bower_components/jquery/jquery.js',
'bower_components/angular/angular.js',
'bower_components/bootstrap/dist/js/bootstrap.js',
'js/home/home_index.js'
),
'css' => array(
'bower_components/bootstrap/dist/css/bootstrap.css',
'css/home/home_index.css'
)
)
)
)
);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.