Permalink
Browse files

JSHint compatibility.

  • Loading branch information...
1 parent 9f1a3a3 commit 8cbf017a5a5a1ff428b4a3223a9363ce790eff31 @meowgorithm committed May 24, 2012
Showing with 8 additions and 6 deletions.
  1. +8 −6 lib/cakewalk.js
View
14 lib/cakewalk.js
@@ -33,8 +33,10 @@ Builder.prototype = {
fs.readFile(this.source, 'utf8', function(err, data) {
+ var compiled;
+
try {
- var compiled = self.compileFunction(data);
+ compiled = self.compileFunction(data);
} catch(err) {
err.printError();
}
@@ -75,7 +77,7 @@ Builder.prototype = {
*/
function CoffeeBuilder(source, destination) {
- var destination = destination || replaceExtension(source, 'js');
+ destination = destination || replaceExtension(source, 'js');
var builder = new Builder(source, destination, function(input) {
try {
@@ -95,7 +97,7 @@ function CoffeeBuilder(source, destination) {
*/
function StylusBuilder(source, destination) {
- var destination = destination || replaceExtension(source, 'css');
+ destination = destination || replaceExtension(source, 'css');
var builder = new Builder(source, destination, function(input) {
var output;
@@ -118,7 +120,7 @@ function StylusBuilder(source, destination) {
*/
function JadeBuilder(source, destination) {
- var destination = destination || replaceExtension(source, 'html');
+ destination = destination || replaceExtension(source, 'html');
var builder = new Builder(source, destination, function(input) {
try {
@@ -147,7 +149,7 @@ function JadeBuilder(source, destination) {
*/
function replaceExtension(filename, newExtension) {
return filename.replace(/(?:\.\w+)$/i, '.' + newExtension);
-};
+}
/**
@@ -223,7 +225,7 @@ Cakewalker.prototype = {
}
}
-}
+};
exports.Cakewalker = Cakewalker;

0 comments on commit 8cbf017

Please sign in to comment.