- 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
65 lines
1.3 KiB
PHP
65 lines
1.3 KiB
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\Repository;
|
|
|
|
/**
|
|
* Bower repository.
|
|
*
|
|
* @author François Pluchino <francois.pluchino@gmail.com>
|
|
*/
|
|
class BowerRepository extends AbstractAssetsRepository
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
protected function getType()
|
|
{
|
|
return 'bower';
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
protected function getUrl()
|
|
{
|
|
return 'https://registry.bower.io/packages';
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
protected function getPackageUrl()
|
|
{
|
|
return $this->canonicalizeUrl($this->baseUrl.'/%package%');
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
protected function getSearchUrl()
|
|
{
|
|
return $this->canonicalizeUrl($this->baseUrl.'/search/%query%');
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
protected function createVcsRepositoryConfig(array $data, $registryName = null)
|
|
{
|
|
return array(
|
|
'type' => $this->assetType->getName().'-vcs',
|
|
'url' => $data['url'],
|
|
'name' => $registryName,
|
|
);
|
|
}
|
|
}
|