From 62b166aee5ceaff0ed52892a6ff3f8aecefc6937 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 24 Sep 2020 05:03:07 -0700 Subject: [PATCH] ext/greenwich - Improve portability. Consolidate tasks. 1. Using 'php-eval' instead of 'shell' should make it safer to run on Windows. 2. The two steps are very closesly related. Putting them into the same 'task' means that it's a bit easier to understand the 'watch' behavior. --- ext/greenwich/composer.compile.json | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ext/greenwich/composer.compile.json b/ext/greenwich/composer.compile.json index 932659b286..310523df0c 100644 --- a/ext/greenwich/composer.compile.json +++ b/ext/greenwich/composer.compile.json @@ -1,14 +1,13 @@ { "compile": [ - { - "title": "Greenwich (Coerce select2-bootstrap to SCSS)", - "shell": "set -e ; mkdir -p extern/select2 ; cp ../../bower_components/select2/select2-bootstrap.css extern/select2/select2-bootstrap.scss", - "watch-files": ["../../bower_components/select2/"] - }, { "title": "Greenwich CSS (dist/bootstrap3.css)", - "php-method": "\\Civi\\Compile\\Scss::build", - "watch-files": ["scss", "extern/select2"], + "run": [ + "@php-eval mkdir('extern/select2', 0777, TRUE);", + "@php-eval $ok = copy('../../bower_components/select2/select2-bootstrap.css', 'extern/select2/select2-bootstrap.scss'); exit($ok?0:1);", + "@php-method \\Civi\\Compile\\Scss::build" + ], + "watch-files": ["scss", "../../bower_components/select2/select2-bootstrap.css"], "scss-files": {"scss/main.scss": "dist/bootstrap3.css"}, "scss-includes": ["scss", "extern/bootstrap3/assets/stylesheets", "extern/select2"] } -- 2.25.1