From 3ebf78e25247181754a878cbf9255c2a114cb808 Mon Sep 17 00:00:00 2001 From: Daku Date: Wed, 18 May 2016 14:50:38 +0100 Subject: [PATCH] make sure lib/vendor folder is cleared on composer update this stops old libs from still being cached by mistake --- composer.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/composer.json b/composer.json index 84bb6c8c..dfe1776e 100644 --- a/composer.json +++ b/composer.json @@ -43,6 +43,13 @@ }, "scripts": { + "pre-install-cmd" : [ + "php -r \"array_map('unlink', array_merge(glob('lib/vendor/js/*.{js,map}', GLOB_BRACE), glob('lib/vendor/css/*.css'), glob('lib/vendor/swf/*.swf')));\"" + ], + "pre-update-cmd" : [ + "php -r \"array_map('unlink', array_merge(glob('lib/vendor/js/*.{js,map}', GLOB_BRACE), glob('lib/vendor/css/*.css'), glob('lib/vendor/swf/*.swf')));\"" + ], + "post-install-cmd" : [ "php -r \"array_map('copy', array_keys(json_decode(file_get_contents('composer.json'), TRUE)['vendor-copy']), json_decode(file_get_contents('composer.json'), TRUE)['vendor-copy']);\"" ],