From e637ba924f0b1f87000145e2d406feabac3abe58 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 26 Aug 2019 12:15:52 -0400 Subject: [PATCH] format child_process commands --- gulpfile.js | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 639a0e10a2..2b1590830e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -115,7 +115,17 @@ function distEdge(cb) { .then(() => edgeCopyAssets('./store/windows/**/*', edgePath)) .then(() => { // makeappx.exe must be in your system's path already - child.spawn('makeappx.exe', ['pack', '/h', 'SHA256', '/d', edgePath, '/p', appxPath]); + const proc = child.spawn('makeappx.exe', [ + 'pack', + '/h', + 'SHA256', + '/d', + edgePath, + '/p', + appxPath]); + stdOutProc(proc); + return new Promise((resolve) => proc.on('close', resolve)); + }).then(() => { return cb; }, () => { return cb; @@ -168,11 +178,26 @@ function distSafari(cb) { .then(() => safariCopyAssets(paths.safari + '**/*', buildPath)) .then(() => safariCopyBuild(paths.build + '**/*', buildPath + 'safari/app')) .then(() => { - const proc = child.spawn('xcodebuild', ['-project', buildPath + 'desktop.xcodeproj', '-target', 'safari', '-configuration', 'Release']); + const proc = child.spawn('xcodebuild', [ + '-project', + buildPath + 'desktop.xcodeproj', + '-target', + 'safari', + '-configuration', + 'Release']); stdOutProc(proc); return new Promise((resolve) => proc.on('close', resolve)); }).then(() => { - const proc = child.spawn('codesign', ['--verbose', '--force', '-o', 'runtime', '--sign', devId, '--entitlements', entitlementsPath, builtAppexPath]); + const proc = child.spawn('codesign', [ + '--verbose', + '--force', + '-o', + 'runtime', + '--sign', + devId, + '--entitlements', + entitlementsPath, + builtAppexPath]); stdOutProc(proc); return new Promise((resolve) => proc.on('close', resolve)); }).then(() => { @@ -205,7 +230,8 @@ function safariCopyBuild(source, dest) { function stdOutProc(proc) { proc.stdout.on('data', (data) => console.log(data.toString())); - proc.stderr.on('data', (data) => console.error(data.toString()));} + proc.stderr.on('data', (data) => console.error(data.toString())); +} function webfonts() { return gulp.src('./webfonts.list')