diff --git a/composer.json b/composer.json index 613451e..7dce946 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,20 @@ } ], "require": { - "sculpin/sculpin": "^2.1@dev", "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" + ] } } diff --git a/scripts/composer/ScriptHandler.php b/scripts/composer/ScriptHandler.php new file mode 100644 index 0000000..474368e --- /dev/null +++ b/scripts/composer/ScriptHandler.php @@ -0,0 +1,28 @@ +exists("$sculpinRoot/$dir")) { + $fs->mkdir("$sculpinRoot/$dir"); + $fs->touch("$sculpinRoot/$dir/.gitkeep"); + } + } + } +}