]> git.proxmox.com Git - mirror_xterm.js.git/blobdiff - gulpfile.js
Fix browserify build and search addon (#804)
[mirror_xterm.js.git] / gulpfile.js
index ef4e46099858a36e60b12b3ebb5678973c1b3960..6e21102323b1b768a0ad1c369347ff7922d9a0b6 100644 (file)
@@ -22,6 +22,12 @@ let tsProjectSearchAddon = ts.createProject('./src/addons/search/tsconfig.json')
 let srcDir = tsProject.config.compilerOptions.rootDir;
 let outDir = tsProject.config.compilerOptions.outDir;
 
+// Under some environments like TravisCI, this comes out at absolute which can
+// break the build. This ensures that the outDir is absolute.
+if (outDir.indexOf(__dirname) !== 0) {
+  outDir = `${__dirname}/${outDir}`;
+}
+
 /**
  * Compile TypeScript sources to JavaScript files and create a source map file for each TypeScript
  * file compiled.