Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #33 from sktaylor/master

Add getCompiledFileSync and refactor _extension
  • Loading branch information...
commit c0579914ba59c2320ecf5eb9f02027e761230824 2 parents c518dd8 + a030385
@maxtaco authored
Showing with 11 additions and 1 deletion.
  1. +11 −1 lib/tamejs.js
View
12 lib/tamejs.js
@@ -11,7 +11,7 @@ exports.runtime = runtime;
//-----------------------------------------------------------------------
-function _extension (module, filename) {
+function getCompiledFileSync(filename){
var recompile = true;
@@ -49,6 +49,16 @@ function _extension (module, filename) {
out = fs.readFileSync(cachePath, 'utf8');
}
+ return(out);
+};
+
+//-----------------------------------------------------------------------
+
+exports.getCompiledFileSync = getCompiledFileSync;
+
+//-----------------------------------------------------------------------
+function _extension (module, filename) {
+ var out = getCompiledFileSync(filename);
module._compile (out, filename);
};
Please sign in to comment.
Something went wrong with that request. Please try again.