Skip to content

Commit

Permalink
Switch from grunt-parallel to grunt-concurrent (#3168)
Browse files Browse the repository at this point in the history
grunt-parallel has a problem where if there is any stderr, it won't
print the stdout. grunt-concurrent isn't perfect either because it
prints stderr after stdout but this isn't too much of a problem as most
of our steps don't do this.

Fixes 3164
  • Loading branch information
kainino0x authored Nov 14, 2023
1 parent 0e06340 commit d3e4c53
Show file tree
Hide file tree
Showing 3 changed files with 231 additions and 71 deletions.
20 changes: 8 additions & 12 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,24 +175,21 @@ module.exports = function (grunt) {
},
},

parallel: {
concurrent: {
'write-out-wpt-cts-html-all': {
options: { grunt: true },
tasks: [
'run:write-out-wpt-cts-html',
'run:write-out-wpt-cts-html-chunked2sec',
],
},
'all-builds': {
options: { grunt: true },
tasks: [
'build-standalone',
'build-wpt',
'run:build-out-node',
],
},
'all-checks': {
options: { grunt: true },
tasks: [
'ts:check',
'run:validate',
Expand All @@ -203,18 +200,17 @@ module.exports = function (grunt) {
],
},
'all-builds-and-checks': {
options: { grunt: true },
tasks: [
'build-all', // Internally parallel
'parallel:all-checks',
'build-all', // Internally concurrent
'concurrent:all-checks',
],
},
},
});

grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-parallel');
grunt.loadNpmTasks('grunt-concurrent');
grunt.loadNpmTasks('grunt-run');
grunt.loadNpmTasks('grunt-ts');

Expand All @@ -241,11 +237,11 @@ module.exports = function (grunt) {
'run:copy-assets-wpt',
'copy:gen-to-out-wpt',
'copy:htmlfiles-to-out-wpt',
'parallel:write-out-wpt-cts-html-all',
'concurrent:write-out-wpt-cts-html-all',
'run:autoformat-out-wpt',
]);
grunt.registerTask('build-all', 'Build out*/ (no checks; run after generate-common)', [
'parallel:all-builds',
'concurrent:all-builds',
'build-done-message',
]);
grunt.registerTask('build-done-message', () => {
Expand All @@ -260,7 +256,7 @@ module.exports = function (grunt) {
registerTaskAndAddToHelp('all', 'Run all builds and checks', [
'clean',
'generate-common',
'parallel:all-builds-and-checks',
'concurrent:all-builds-and-checks',
]);
registerTaskAndAddToHelp('standalone', 'Build standalone (out/) (no checks)', [
'generate-common',
Expand All @@ -273,7 +269,7 @@ module.exports = function (grunt) {
'build-done-message',
]);
registerTaskAndAddToHelp('checks', 'Run all checks (and build tsdoc)', [
'parallel:all-checks',
'concurrent:all-checks',
]);
registerTaskAndAddToHelp('unittest', 'Just run unittests', [
'run:unittest',
Expand Down
Loading

0 comments on commit d3e4c53

Please sign in to comment.