Permalink
Browse files

support for node 0.8

  • Loading branch information...
1 parent 037ede0 commit 938ed1002800f198f5c0e45479aec27d46c545d8 @jgallen23 committed Oct 5, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/compile.js
View
@@ -3,6 +3,7 @@ var jade = require('jade');
var path = require('path');
var res = require('resistance');
var uglifyJs = require('uglify-js');
+var exists = fs.existsSync || path.existsSync;
var jadeCompile = function(file, str) {
var f = jade.compile(str, {
@@ -18,11 +19,11 @@ var jadeCompile = function(file, str) {
var findRuntime = function() {
var runtime = path.join(__dirname, '../node_modules/jade/runtime.js');
- if (path.existsSync(runtime))
+ if (exists(runtime))
return runtime;
runtime = path.join(__dirname, '../../jade/runtime.js')
- if (path.existsSync(runtime))
+ if (exists(runtime))
return runtime;
throw new Error('runtime.js not found');

0 comments on commit 938ed10

Please sign in to comment.