From 5383d91b60a6414d3ad4d8c6e630d6e74a177b97 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Thu, 23 Jun 2016 12:49:20 -0700 Subject: [PATCH 1/3] Fix case of gulpfile dependencies --- Gulpfile.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Gulpfile.ts b/Gulpfile.ts index ddc0dce8552..d88e8bd0664 100644 --- a/Gulpfile.ts +++ b/Gulpfile.ts @@ -1,4 +1,5 @@ /// +/// import * as cp from "child_process"; import * as path from "path"; @@ -25,7 +26,7 @@ declare global { type Promise = Q.Promise; } import del = require("del"); -import mkdirP = require("mkdirP"); +import mkdirP = require("mkdirp"); import minimist = require("minimist"); import browserify = require("browserify"); import through2 = require("through2"); From c9511b736ec433f95c5f48586f810eadb54bbe40 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Thu, 23 Jun 2016 13:08:27 -0700 Subject: [PATCH 2/3] 1. pass subshell args 2. fix build order in services 1. /bin/sh requires its arguments joined into a single string unlike cmd. 2. services/ depends on a couple of files from server/ but the order was implicit, and changed from jakefile. Now the order is explicit in the tsconfig. --- Gulpfile.ts | 4 +++- src/server/tsconfig.json | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Gulpfile.ts b/Gulpfile.ts index d88e8bd0664..50d6bfa50d6 100644 --- a/Gulpfile.ts +++ b/Gulpfile.ts @@ -68,7 +68,9 @@ const cmdLineOptions = minimist(process.argv.slice(2), { function exec(cmd: string, args: string[], complete: () => void = (() => {}), error: (e: any, status: number) => void = (() => {})) { console.log(`${cmd} ${args.join(" ")}`); // TODO (weswig): Update child_process types to add windowsVerbatimArguments to the type definition - const ex = cp.spawn(isWin ? "cmd" : "/bin/sh", [isWin ? "/c" : "-c", cmd, ...args], { stdio: "inherit", windowsVerbatimArguments: true } as any); + const subshellFlag = isWin ? "/c" : "-c"; + const command = isWin ? [cmd, ...args] : [`${cmd} ${args.join(' ')}`]; + const ex = cp.spawn(isWin ? "cmd" : "/bin/sh", [subshellFlag, ...command], { stdio: "inherit", windowsVerbatimArguments: true } as any); ex.on("exit", (code) => code === 0 ? complete() : error(/*e*/ undefined, code)); ex.on("error", error); } diff --git a/src/server/tsconfig.json b/src/server/tsconfig.json index 4daacead8e8..0a8cfb89ab3 100644 --- a/src/server/tsconfig.json +++ b/src/server/tsconfig.json @@ -8,6 +8,8 @@ "stripInternal": true }, "files": [ + "../services/shims.ts", + "../services/utilities.ts", "node.d.ts", "editorServices.ts", "protocol.d.ts", From ca25feaa836fc56c64970b14ba9b3ece347a5ab1 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Thu, 23 Jun 2016 13:20:53 -0700 Subject: [PATCH 3/3] Fix single-quote lint --- Gulpfile.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gulpfile.ts b/Gulpfile.ts index 50d6bfa50d6..189049e000d 100644 --- a/Gulpfile.ts +++ b/Gulpfile.ts @@ -69,7 +69,7 @@ function exec(cmd: string, args: string[], complete: () => void = (() => {}), er console.log(`${cmd} ${args.join(" ")}`); // TODO (weswig): Update child_process types to add windowsVerbatimArguments to the type definition const subshellFlag = isWin ? "/c" : "-c"; - const command = isWin ? [cmd, ...args] : [`${cmd} ${args.join(' ')}`]; + const command = isWin ? [cmd, ...args] : [`${cmd} ${args.join(" ")}`]; const ex = cp.spawn(isWin ? "cmd" : "/bin/sh", [subshellFlag, ...command], { stdio: "inherit", windowsVerbatimArguments: true } as any); ex.on("exit", (code) => code === 0 ? complete() : error(/*e*/ undefined, code)); ex.on("error", error);