Browse Source

Plugin skeleton

tags/1.0.0
Anton Smirnov 1 year ago
parent
commit
182331d5e4
4 changed files with 61 additions and 2 deletions
  1. +1
    -0
      .gitignore
  2. +22
    -2
      composer.json
  3. +14
    -0
      src/YamlCommandProvider.php
  4. +24
    -0
      src/YamlPlugin.php

+ 1
- 0
.gitignore View File

@@ -1,3 +1,4 @@
/.idea
/docs/*.html
/vendor/
composer.lock

+ 22
- 2
composer.json View File

@@ -1,10 +1,11 @@
{
"name": "sandfoxme/composer-yaml",
"type": "library",
"type": "composer-plugin",
"license": "MIT",
"description": "Yaml support plugin for composer",
"keywords": [
"composer",
"composer plugin",
"yaml"
],
"authors": [
@@ -13,5 +14,24 @@
"email": "[email protected]"
}
],
"require": {}
"autoload": {
"psr-4": {
"SandFox\\ComposerYaml\\": "src"
}
},
"extra": {
"class": "SandFox\\ComposerYaml\\YamlPlugin"
},
"require": {
"symfony/yaml": "^2|^3|^4",

"composer-plugin-api": "^1.1",
"php": ">= 5.5"
},
"require-dev": {
"composer/composer": "~1.8"
},
"suggest": {
"ext-yaml": "*"
}
}

+ 14
- 0
src/YamlCommandProvider.php View File

@@ -0,0 +1,14 @@
<?php

namespace SandFox\ComposerYaml;

use Composer\Plugin\Capability\CommandProvider;

class YamlCommandProvider implements CommandProvider
{
public function getCommands()
{
return [
];
}
}

+ 24
- 0
src/YamlPlugin.php View File

@@ -0,0 +1,24 @@
<?php

namespace SandFox\ComposerYaml;

use Composer\Composer;
use Composer\IO\IOInterface;
use Composer\Plugin\Capability\CommandProvider;
use Composer\Plugin\Capable;
use Composer\Plugin\PluginInterface;

class YamlPlugin implements PluginInterface, Capable
{
public function getCapabilities()
{
return [
CommandProvider::class => YamlCommandProvider::class,
];
}

public function activate(Composer $composer, IOInterface $io)
{
//
}
}

Loading…
Cancel
Save