Skip to content

Commit

Permalink
Updated Gruntfile to handle new ember-cli logging format
Browse files Browse the repository at this point in the history
refs TryGhost/Admin#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
  • Loading branch information
kevinansfield committed Oct 19, 2019
1 parent c34c8e9 commit 7b379a9
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
},
Expand Down

0 comments on commit 7b379a9

Please sign in to comment.