Fix browserify build and search addon (#804)

Fixes #803
This commit is contained in:
Daniel Imms
2017-07-18 19:58:35 -07:00
committed by GitHub
parent 05d308a37a
commit f8e3fa5a99
2 changed files with 12 additions and 6 deletions
+6
View 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.