Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove redundant CoffeeScript file read.

  • Loading branch information...
commit e0ed1b7947ab851554835586199bdf591721d851 1 parent a475a18
@aseemk aseemk authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/compiler/underscored.js
View
8 lib/compiler/underscored.js
@@ -26,13 +26,13 @@ function run(options) {
}
}
- function grind(filename) {
+ function grind(coffee, filename) {
try {
- var coffee = require("coffee-script");
+ var CS = require("coffee-script");
} catch (e) {
throw new Error("Cannot load CoffeeScript to compile: '" + filename + "'");
}
- return coffee.compile(fs.readFileSync(filename, "utf8"), {
+ return CS.compile(coffee, {
filename: filename
});
}
@@ -53,7 +53,7 @@ function run(options) {
module._compile(streamlined, filename)
},
_coffee: function(module, filename, code) {
- var code = grind(filename);
+ code = grind(code, filename);
streamliners._js(module, filename, code, options);
}
};
Please sign in to comment.
Something went wrong with that request. Please try again.