Remove Composer scripts

This commit is contained in:
Oliver Davies 2017-09-11 22:22:35 +01:00
parent 014010f99f
commit ffec6fef7a
2 changed files with 0 additions and 41 deletions

View file

@ -12,18 +12,5 @@
"require": {
"dflydev/embedded-composer": "^1.0@dev",
"sculpin/sculpin": "^2.1@dev"
},
"autoload": {
"classmap": [
"scripts/composer/ScriptHandler.php"
]
},
"scripts": {
"post-install-cmd": [
"SculpinSkeleton\\composer\\ScriptHandler::createRequiredFiles"
],
"post-update-cmd": [
"SculpinSkeleton\\composer\\ScriptHandler::createRequiredFiles"
]
}
}

View file

@ -1,28 +0,0 @@
<?php
namespace SculpinSkeleton\composer;
use Composer\Script\Event;
use Symfony\Component\Filesystem\Filesystem;
class ScriptHandler
{
public static function createRequiredFiles(Event $event)
{
$fs = new Filesystem();
$sculpinRoot = getcwd();
$dirs = [
'app/config',
'source',
];
foreach ($dirs as $dir) {
if (!$fs->exists("$sculpinRoot/$dir")) {
$fs->mkdir("$sculpinRoot/$dir");
$fs->touch("$sculpinRoot/$dir/.gitkeep");
}
}
}
}