Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

BowerInstaller.php 978B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /*
  3. * This file is part of the Fxp Composer Asset Plugin package.
  4. *
  5. * (c) François Pluchino <francois.pluchino@gmail.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Fxp\Composer\AssetPlugin\Installer;
  11. use Composer\Package\PackageInterface;
  12. /**
  13. * Installer for bower packages.
  14. *
  15. * @author Martin Hasoň <martin.hason@gmail.com>
  16. * @author François Pluchino <francois.pluchino@gmail.com>
  17. */
  18. class BowerInstaller extends AssetInstaller
  19. {
  20. /**
  21. * {@inheritdoc}
  22. */
  23. protected function addIgnorePatterns(IgnoreManager $manager, PackageInterface $package)
  24. {
  25. $extra = $package->getExtra();
  26. if (!empty($extra['bower-asset-ignore'])) {
  27. $manager->doAddPattern('!bower.json');
  28. foreach ($extra['bower-asset-ignore'] as $pattern) {
  29. $manager->addPattern($pattern);
  30. }
  31. }
  32. }
  33. }