Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
barryvdh committed Aug 19, 2014
1 parent 3015367 commit 894b66e
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 58 deletions.
22 changes: 0 additions & 22 deletions .gitattributes

This file was deleted.

41 changes: 5 additions & 36 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,36 +1,5 @@
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# =========================
# Operating System Files
# =========================

# OSX
# =========================

.DS_Store
.AppleDouble
.LSOverride

# Icon must ends with two \r.
Icon

# Thumbnails
._*

# Files that might appear on external disk
.Spotlight-V100
.Trashes
/vendor
/.idea
composer.phar
composer.lock
.DS_Store
24 changes: 24 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "barryvdh/composer-cleanup-login",
"type": "composer-plugin",
"description": "A composer cleanup plugin, to remove tests and documentation to save space",
"license": "MIT",
"authors": [
{
"name": "Barry vd. Heuvel",
"email": "[email protected]"
}
],
"require": {
"composer-plugin-api": "1.0.0",
"symfony/finder": "~2.2"
},
"autoload": {
"psr-4": {
"Barryvdh\\Composer\\": "src/"
}
},
"extra": {
"class": "Barryvdh\\Composer\\CleanupPlugin"
},
}
45 changes: 45 additions & 0 deletions src/CleanupPlugin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

namespace Barryvdh\Composer;

use Composer\Composer;
use Composer\EventDispatcher\EventSubscriberInterface;
use Composer\IO\IOInterface;
use Composer\Plugin\PluginInterface;
use Composer\Script\ScriptEvents;
use Composer\Script\PackageEvent;

class CleanupPlugin implements PluginInterface, EventSubscriberInterface
{
protected $composer;
protected $io;

public function activate(Composer $composer, IOInterface $io)
{
$this->composer = $composer;
$this->io = $io;
}

public static function getSubscribedEvents()
{
return array(
ScriptEvents::POST_PACKAGE_INSTALL => array(
array('onPostPackageInstall', 0)
),
ScriptEvents::POST_PACKAGE_UPDATE => array(
array('onPostPackageUpdate', 0)
),
);
}

public function onPostPackageInstall(PackageEvent $event)
{
// TODO
}

public function onPostPackageUpdate(PackageEvent $event)
{
// TODO
}

}

0 comments on commit 894b66e

Please sign in to comment.