1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-11 09:32:55 +00:00

Add --no-scripts argument for dump-autoload command

This commit is contained in:
cw-ozaki 2014-08-08 16:27:19 +09:00
parent 4ecdbf89c4
commit d649cfc6a1
3 changed files with 12 additions and 2 deletions

View file

@ -30,6 +30,7 @@ class DumpAutoloadCommand extends Command
->setAliases(array('dumpautoload'))
->setDescription('Dumps the autoloader')
->setDefinition(array(
new InputOption('no-scripts', null, InputOption::VALUE_NONE, 'Skips the execution of all scripts defined in composer.json file.'),
new InputOption('optimize', 'o', InputOption::VALUE_NONE, 'Optimizes PSR0 and PSR4 packages to be loaded with classmaps too, good for production.'),
new InputOption('no-dev', null, InputOption::VALUE_NONE, 'Disables autoload-dev rules.'),
))
@ -62,6 +63,7 @@ EOT
$generator = $composer->getAutoloadGenerator();
$generator->setDevMode(!$input->getOption('no-dev'));
$generator->setRunScripts(!$input->getOption('no-scripts'));
$generator->dump($config, $localRepo, $package, $installationManager, 'composer', $optimize);
}
}