electron-compile-cache
Advanced tools
Comparing version 0.6.1 to 0.6.2
@@ -70,2 +70,4 @@ 'use strict'; | ||
value: function shouldCompileFile(fullPath) { | ||
var sourceCode = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1]; | ||
this.ensureInitialized(); | ||
@@ -196,3 +198,3 @@ var lowerPath = fullPath.toLowerCase(); | ||
if (!this.shouldCompileFile(fullPath)) { | ||
if (!this.shouldCompileFile(fullPath, sourceCode)) { | ||
if (returnOnly) return sourceCode; | ||
@@ -199,0 +201,0 @@ return module._compile(sourceCode, filePath); |
{ | ||
"name": "electron-compile-cache", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"description": "Base class for compilers in electron-compile, use this to implement your own compiler", | ||
@@ -5,0 +5,0 @@ "main": "lib/compile-cache.js", |
@@ -35,3 +35,3 @@ import crypto from 'crypto'; | ||
shouldCompileFile(fullPath) { | ||
shouldCompileFile(fullPath, sourceCode=null) { | ||
this.ensureInitialized(); | ||
@@ -151,3 +151,3 @@ let lowerPath = fullPath.toLowerCase(); | ||
if (!this.shouldCompileFile(fullPath)) { | ||
if (!this.shouldCompileFile(fullPath, sourceCode)) { | ||
if (returnOnly) return sourceCode; | ||
@@ -154,0 +154,0 @@ return module._compile(sourceCode, filePath); |
15902
391