20862be7d0
- slim/slim: ^3.1 - symfony/expression-language: ^3.4 - fxp/composer-asset-plugin: ~1.3 - bower-asset/vue: ^2.5 - bower-asset/vue-resource: ^1.5
40 lines
978 B
PHP
40 lines
978 B
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of the Fxp Composer Asset Plugin package.
|
|
*
|
|
* (c) François Pluchino <francois.pluchino@gmail.com>
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Fxp\Composer\AssetPlugin\Installer;
|
|
|
|
use Composer\Package\PackageInterface;
|
|
|
|
/**
|
|
* Installer for bower packages.
|
|
*
|
|
* @author Martin Hasoň <martin.hason@gmail.com>
|
|
* @author François Pluchino <francois.pluchino@gmail.com>
|
|
*/
|
|
class BowerInstaller extends AssetInstaller
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
protected function addIgnorePatterns(IgnoreManager $manager, PackageInterface $package)
|
|
{
|
|
$extra = $package->getExtra();
|
|
|
|
if (!empty($extra['bower-asset-ignore'])) {
|
|
$manager->doAddPattern('!bower.json');
|
|
|
|
foreach ($extra['bower-asset-ignore'] as $pattern) {
|
|
$manager->addPattern($pattern);
|
|
}
|
|
}
|
|
}
|
|
}
|