Yii::setPathOfAlias('b_theme', dirname(__FILE__) . '/path/to/files'); $package = array( 'basePath' => 'b_theme', 'css' => array('css/style.css'), 'js' => array('js/main.js'), ); Yii::app()->clientScript ->addPackage( 'be_theme', $package ) ->registerPackage( 'be_theme' );
to register a package wich files are not contained in the application folder, but in another, cause they are shared trought many yii application.
This works great as I can share one css/js file trought different application.
The problem come out when I update one of the files contained in the package. The edit are not recognised by the package untill I empty the assets folder in every sub-Application.
Is there anyway to check for edit in this file and auto-regenerate the package?
Thanks in advance