diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..45e044f --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +composer.phar +nbproject +._* +.~lock.* +.buildpath +.DS_Store +.idea +.project +.settings diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..a22be8c --- /dev/null +++ b/composer.json @@ -0,0 +1,16 @@ +{ + "name": "koubas/grouped-library-installer", + "type": "composer-installer", + "authors": [ + { + "name": "Jakub Husak", + "email": "husak.j@gmail.com" + } + ], + "autoload": { + "psr-0": {"Koubas\\Composer\\Installer": "src/"} + }, + "extra": { + "class": "Koubas\\Composer\\Installer\\GroupedLibraryInstaller" + } +} diff --git a/composer.phar b/composer.phar new file mode 100755 index 0000000..8fe4af8 Binary files /dev/null and b/composer.phar differ diff --git a/src/Koubas/Composer/Installer/GroupedLibraryInstaller.php b/src/Koubas/Composer/Installer/GroupedLibraryInstaller.php new file mode 100644 index 0000000..605b460 --- /dev/null +++ b/src/Koubas/Composer/Installer/GroupedLibraryInstaller.php @@ -0,0 +1,33 @@ +getName()); + $words = explode('-', end($pkgNameParts)); + $dirName = ''; + foreach ($words as $word) { + $dirName .= ucfirst($word); + } + return "module/$dirName"; + } + + public function supports($packageType) + { + return 'koubas-grouped-library' === $packageType; + } +}