Skip to content

Commit

Permalink
Pull request electron-userland#260
Browse files Browse the repository at this point in the history
  • Loading branch information
eliot-akira committed Mar 28, 2018
1 parent 9365243 commit aebf05a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/compiler-host.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,13 @@ export default class CompilerHost {
}

let ctx = {};
let code = hashInfo.sourceCode || await pfs.readFile(filePath, 'utf8');

if (!(await compiler.shouldCompileFile(code, ctx))) {
if (!(await compiler.shouldCompileFile(filePath, ctx))) {
d(`Compiler returned false for shouldCompileFile: ${filePath}`);
return { code, mimeType: mimeTypes.lookup(filePath), dependentFiles: [] };
return { filePath, mimeType: mimeTypes.lookup(filePath), dependentFiles: [] };
}

let code = hashInfo.sourceCode || await pfs.readFile(filePath, 'utf8');
let dependentFiles = await compiler.determineDependentFiles(code, filePath, ctx);

d(`Using compiler options: ${JSON.stringify(compiler.compilerOptions)}`);
Expand Down Expand Up @@ -579,13 +579,13 @@ export default class CompilerHost {
}

let ctx = {};
let code = hashInfo.sourceCode || fs.readFileSync(filePath, 'utf8');

if (!(compiler.shouldCompileFileSync(code, ctx))) {
if (!(compiler.shouldCompileFileSync(filePath, ctx))) {
d(`Compiler returned false for shouldCompileFile: ${filePath}`);
return { code, mimeType: mimeTypes.lookup(filePath), dependentFiles: [] };
return { filePath, mimeType: mimeTypes.lookup(filePath), dependentFiles: [] };
}

let code = hashInfo.sourceCode || fs.readFileSync(filePath, 'utf8');
let dependentFiles = compiler.determineDependentFilesSync(code, filePath, ctx);

let result = compiler.compileSync(code, filePath, ctx);
Expand Down

0 comments on commit aebf05a

Please sign in to comment.