From baf8aa1b8c7be8570bfbfc7289f8f11c42894559 Mon Sep 17 00:00:00 2001 From: Daku Date: Wed, 11 May 2016 16:50:39 +0100 Subject: [PATCH] use composer to grab jquery this requires composer-asset-plugin to be globally installed --- composer.json | 21 ++++++++++++++++++++- install.php | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 3a4d6155..2751ea0c 100644 --- a/composer.json +++ b/composer.json @@ -3,6 +3,25 @@ "license" : "GPL-2.0", "require" : { - "php" : ">=5.4.8" + "php" : ">=5.4.8", + + "fxp/composer-asset-plugin": "~1.1", + "bower-asset/jquery": "1.12.3" + + }, + + "vendor-copy": { + "vendor/bower-asset/jquery/dist/jquery.js" : "lib/vendor/js/jquery-1.12.3.js", + "vendor/bower-asset/jquery/dist/jquery.min.js" : "lib/vendor/js/jquery-1.12.3.min.js", + "vendor/bower-asset/jquery/dist/jquery.min.map" : "lib/vendor/js/jquery-1.12.3.min.map" + }, + + "scripts": { + "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']);\"" + ], + "post-update-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']);\"" + ] } } diff --git a/install.php b/install.php index 3c6d2b19..fc76bfbd 100644 --- a/install.php +++ b/install.php @@ -27,7 +27,7 @@ date_default_timezone_set('UTC'); Shimmie Installation - +