Created
July 12, 2013 04:38
-
-
Save keithics/5981506 to your computer and use it in GitHub Desktop.
https://github.com/kriswallsmith/assetic using Assetic with Laravel 4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Assetic\AssetManager; | |
use Assetic\Asset\AssetCollection; | |
use Assetic\Asset\FileAsset; | |
use Assetic\Asset\GlobAsset; | |
use Assetic\Filter\Yui; | |
use Assetic\AssetWriter; | |
$am = new AssetManager(); | |
$yui = new Yui\JsCompressorFilter('/var/www/laravel/yuicompressor.jar'); | |
// $yui->setNomunge(true); | |
$js = new GlobAsset('/var/www/laravel/public/admin_assets/js/*.js'); | |
$ac = new AssetCollection(array($js), array($yui)); | |
$ac->setTargetPath('min.js'); | |
$am->set('basejs',$ac); | |
$writer = new AssetWriter('/var/www/laravel/public/admin_assets/min'); | |
$writer->writeManagerAssets($am); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment