From 42b2fe49858f19829df7265951a0d313387b5410 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Tue, 4 Oct 2016 09:08:07 -0700 Subject: [PATCH 1/2] Update browserify task for gulp-typescript 3.0 1. Doesn't need extra src/ prefix 2. testProject is now a function that needs to be called first. --- Gulpfile.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gulpfile.ts b/Gulpfile.ts index bea8eb30de8..5e67a1b234e 100644 --- a/Gulpfile.ts +++ b/Gulpfile.ts @@ -729,12 +729,12 @@ gulp.task("browserify", "Runs browserify on run.js to produce a file suitable fo return testProject.src() .pipe(newer("built/local/bundle.js")) .pipe(sourcemaps.init()) - .pipe(testProject) + .pipe(testProject()) .pipe(through2.obj((file, enc, next) => { const originalMap = file.sourceMap; const prebundledContent = file.contents.toString(); // Make paths absolute to help sorcery deal with all the terrible paths being thrown around - originalMap.sources = originalMap.sources.map(s => path.resolve("src", s)); + originalMap.sources = originalMap.sources.map(s => path.resolve(s)); // intoStream (below) makes browserify think the input file is named this, so this is what it puts in the sourcemap originalMap.file = "built/local/_stream_0.js"; From 567b842438a4b0cc33d36e297a4ec93d3bfe6172 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Wed, 5 Oct 2016 08:41:42 -0700 Subject: [PATCH 2/2] Generate browserify bundle in correct location --- Gulpfile.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gulpfile.ts b/Gulpfile.ts index 5e67a1b234e..ebedfd43c23 100644 --- a/Gulpfile.ts +++ b/Gulpfile.ts @@ -725,7 +725,7 @@ declare module "convert-source-map" { } gulp.task("browserify", "Runs browserify on run.js to produce a file suitable for running tests in the browser", [servicesFile], (done) => { - const testProject = tsc.createProject("src/harness/tsconfig.json", getCompilerSettings({ outFile: "built/local/bundle.js" }, /*useBuiltCompiler*/ true)); + const testProject = tsc.createProject("src/harness/tsconfig.json", getCompilerSettings({ outFile: "../../built/local/bundle.js" }, /*useBuiltCompiler*/ true)); return testProject.src() .pipe(newer("built/local/bundle.js")) .pipe(sourcemaps.init())