From 7b379a99b2c38bc0af9162a6211012b646cf4a73 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Sat, 19 Oct 2019 14:22:20 +0200 Subject: [PATCH] Updated Gruntfile to handle new ember-cli logging format refs https://github.com/TryGhost/Ghost-Admin/pull/1335 - ember-cli now has a build progress spinner and some updated messages - updates Gruntfile stdout/stderr handling to ignore certain error output so that we continue to output the periodic "building admin client..." notifications --- Gruntfile.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 53aad97cbef..525f79e4691 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -168,8 +168,22 @@ const configureGrunt = function (grunt) { } }, stderr: function (chunk) { - hasBuiltClient = true; - grunt.log.error(chunk); + const skipFilter = grunt.option('client') ? false : [ + /- building/ + ].some(function (regexp) { + return regexp.test(chunk); + }); + + const errorFilter = grunt.option('client') ? false : [ + /^>>/ + ].some(function (regexp) { + return regexp.test(chunk); + }); + + if (!skipFilter) { + hasBuiltClient = errorFilter ? hasBuiltClient : true; + grunt.log.error(chunk); + } } } },