getSourceRoot() . '/' . $script->getSourcePath() . '?' . gmdate($js->getLastModified()) . '">'; } return $retVal; } return ''; } public static function styleIncludes($area = 'app') { $css = self::styleAssetCollection($area); if (Config::get('app.debug')) { $retVal = ''; foreach ($css as $style) { if ($style instanceof CacheBusterAsset) continue; $retVal .= ''; } return $retVal; } return ''; } public static function scriptAssetCollection($area) { if ($area == 'app') { $collection = new AssetCollection([ new FileAsset('scripts/base/jquery-2.0.2.js'), new FileAsset('scripts/base/jquery-ui.js'), new FileAsset('scripts/base/jquery.cookie.js'), new FileAsset('scripts/base/jquery.colorbox.js'), new FileAsset('scripts/base/jquery.viewport.js'), new FileAsset('scripts/base/underscore.js'), new FileAsset('scripts/base/moment.js'), new FileAsset('scripts/base/soundmanager2-nodebug.js'), new FileAsset('scripts/base/angular.js'), new FileAsset('scripts/base/bindonce.js'), new FileAsset('scripts/base/ui-bootstrap-tpls-0.4.0.js'), new FileAsset('scripts/base/angular-ui-sortable.js'), new FileAsset('scripts/base/angular-ui-date.js'), new FileAsset('scripts/base/angular-ui-router.js'), new AssetCollection([ new GlobAsset('scripts/shared/*.coffee'), new GlobAsset('scripts/shared/*.js'), new GlobAsset('scripts/app/*.coffee'), new GlobAsset('scripts/app/services/*.coffee'), new GlobAsset('scripts/app/filters/*.coffee'), new GlobAsset('scripts/app/filters/*.js'), new GlobAsset('scripts/app/directives/*.coffee'), new GlobAsset('scripts/app/controllers/*.coffee'), ], [ new CoffeeScriptFilter(Config::get('app.coffee')) ]) ]); if (Config::get('app.debug')) { $collection->add(new GlobAsset('scripts/debug/*.js')); $collection->add(new AssetCollection([ new GlobAsset('scripts/debug/*.coffee'), ], [ new CoffeeScriptFilter(Config::get('app.coffee')) ])); } return $collection; } throw new Exception(); } public static function styleAssetCollection($area) { if ($area == 'app') { $lastModifiedCollection = new AssetCollection([new GlobAsset("styles/*.less")]); $css = new AssetCollection([ new FileAsset('styles/base/jquery-ui.css'), new FileAsset('styles/base/colorbox.css'), new FileAsset('styles/app.less'), new CacheBusterAsset($lastModifiedCollection->getLastModified()) ], [new \Assetic\Filter\LessFilter('node')]); if (Config::get('app.debug')) { $css->add(new FileAsset('styles/profiler.less')); $css->add(new FileAsset('styles/prettify.css')); } return $css; } throw new Exception(); } }