public function register()
{
$this->package('codesleeve/asset-pipeline');
include_once __DIR__ . '/AssetPipelineGlobalHelpers.php';
$this->app['asset'] = $this->app->share(function ($app) {
$config = $app->config->get('asset-pipeline::config');
$config['base_path'] = base_path();
$config['environment'] = $app['env'];
$parser = new SprocketsParser($config);
$generator = new SprocketsGenerator($config);
$pipeline = new AssetPipeline($parser, $generator);
// let other packages hook into pipeline configuration
$app['events']->fire('asset.pipeline.boot', $pipeline);
return $pipeline->registerAssetPipelineFilters();
});
$this->app['assets.setup'] = $this->app->share(function ($app) {
return new Commands\AssetsSetupCommand();
});
$this->app['assets.clean'] = $this->app->share(function ($app) {
return new Commands\AssetsCleanCommand();
});
$this->app['assets.generate'] = $this->app->share(function ($app) {
return new Commands\AssetsGenerateCommand();
});
$this->commands('assets.setup');
$this->commands('assets.clean');
$this->commands('assets.generate');
}