public function register()
{
$this->app->singleton('asset', function ($app, $parameters = []) {
if (count($parameters) < 2) {
$parameters = array_merge($parameters, [null]);
}
list($dir, $path) = $parameters;
return new Asset($dir, $path);
});
$this->app->bind('manifest', function ($app, $parameters = []) {
if (count($parameters) < 2) {
$parameters = array_merge($parameters, [null]);
}
list($dir, $path) = $parameters;
return new Manifest($dir, $path);
});
// TODO: Allow to register or not Larasset commands in production env with a config option
if ($this->app->environment() !== 'production' && $this->app['config']->get('app.debug')) {
// For security reasons Larasset commands aren't available in production environment
$this->registerCommands();
}
// TODO: Allow to publish default package.json in the config path of the package
}