This extension sets up require js for use in your Yii project. Once installed you use a widget in a view or layout to setup require and then you can use require js as you normally would starting at an entry script (usually main.js) where you can load further modules and dependencies etc.
How to Use:
If you would prefer a different js starting point instead of main.js define this in your main.php file like so:
'params' => array( 'yii-require-js'=>array( 'initialModule' => 'myModule' ),
If you would prefer to load your scripts from another directory other than /protected/components/js you can define this in your main.php config like so:
'params' => array( 'yii-require-js'=>array( 'scriptsDirectory' => 'application.components.js.requireModules' ), ...
This project makes use of RequireJS. Located here: http://requirejs.org/