1
0
Fork 0

Move .composer into vendor (hardcoded for now)

pull/66/merge
Jordi Boggiano 2011-10-29 18:13:11 +02:00
parent 305856f2f5
commit 1e0710b32f
2 changed files with 6 additions and 4 deletions

View File

@ -11,9 +11,11 @@ use Composer\Package;
use Composer\Json\JsonFile;
use Composer\Console\Application as ComposerApplication;
$vendorPath = 'vendor';
// initialize repository manager
$rm = new Repository\RepositoryManager();
$rm->setLocalRepository(new Repository\FilesystemRepository(new JsonFile('.composer/installed.json')));
$rm->setLocalRepository(new Repository\FilesystemRepository(new JsonFile($vendorPath.'/.composer/installed.json')));
$rm->setRepositoryClass('composer', 'Composer\Repository\ComposerRepository');
$rm->setRepositoryClass('pear', 'Composer\Repository\PearRepository');
$rm->setRepositoryClass('package', 'Composer\Repository\PackageRepository');
@ -26,8 +28,8 @@ $dm->setDownloader('zip', new Downloader\ZipDownloader());
// initialize installation manager
$im = new Installer\InstallationManager();
$im->addInstaller(new Installer\LibraryInstaller('vendor', $dm, $rm->getLocalRepository()));
$im->addInstaller(new Installer\LibraryInstaller('vendor/bundles', $dm, $rm->getLocalRepository(), 'symfony-bundle'));
$im->addInstaller(new Installer\LibraryInstaller($vendorPath, $dm, $rm->getLocalRepository()));
$im->addInstaller(new Installer\LibraryInstaller($vendorPath.'/bundles', $dm, $rm->getLocalRepository(), 'symfony-bundle'));
// load package
$loader = new Package\Loader\ArrayLoader($rm);

View File

@ -117,7 +117,7 @@ EOT
$output->writeln('> Generating autoload.php');
$generator = new AutoloadGenerator($localRepo, $composer->getPackage(), $installationManager);
$generator->dump('.composer/autoload.php');
$generator->dump('vendor/.composer/autoload.php');
$output->writeln('> Done');
}