]> git.proxmox.com Git - mirror_xterm.js.git/blobdiff - gulpfile.js
Merge changes from #828
[mirror_xterm.js.git] / gulpfile.js
index afb7df4816d7f2c943804bd000a91f538c89d3c6..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.
@@ -59,7 +65,7 @@ gulp.task('browserify', ['tsc'], function() {
   let browserifyOptions = {
     basedir: buildDir,
     debug: true,
-    entries: [`../${outDir}/xterm.js`],
+    entries: [`${outDir}/xterm.js`],
     standalone: 'Terminal',
     cache: {},
     packageCache: {}