I try to understand how AssetManager works. I delete all folders from asset folder, and then just update my main page. After that only one folder has been created 56dbe7a5. When I look into it, I saw there about 15 javascript files and some folders:
But I haven’t any plugins in my main page. I just include some css styles and jquery core.
/**
* Returns the base URL of all core javascript files.
* If the base URL is not explicitly set, this method will publish the whole directory
* 'framework/web/js/source' and return the corresponding URL.
* @return string the base URL of all core javascript files
*/
public function getCoreScriptUrl()
{
if($this->_baseUrl!==null)
return $this->_baseUrl;
else
return $this->_baseUrl=Yii::app()->getAssetManager()->publish(YII_PATH.'/web/js/source');
}
If you want to disable asset publishing by clientScript completely, you can set a dummy value to coreSrciptUrl in your configuration. I use for example a custom js compressor in some projects and thus disabled script publishing completely in production mode like this:
'clientScript'=>array(
'coreScriptUrl'=>'dummy value', // required to prevent asset publishing of core scripts
'scriptMap'=>array(
'*.js'=>false,
'*.css'=>false,
),
),
it does not publicate any script and styles at all. You maybe brings all javascript files together in one file, and the same with CSS, and then pulicate ones manually. I wanna do this too but dont know the right way.
I saw an extension for it, but I could not make it working.