Permalink
Browse files

more fault tolerant

  • Loading branch information...
1 parent 8649edb commit 66dcf1bcc8d604e503a57ce9ea6620e242d44ced @dodo committed Oct 22, 2011
Showing with 4 additions and 2 deletions.
  1. +1 −0 filename
  2. +3 −2 src/test/template.coffee
View
@@ -0,0 +1 @@
+hello world
View
@@ -16,8 +16,9 @@ module.exports =
xml = new Template schema:'html5', ->
@$html ->
@body ->
- readFile path.join(__dirname,"filename"), (err, filedata) =>
- @$div class:'test', filedata
+ file = path.join(__dirname,"..","..","..","filename")
+ readFile file, (err, filedata) =>
+ @$div class:'test', (filedata or err)
@$ul ->
content.forEach (data) =>
li = @$li({'data-content':data}, data)

0 comments on commit 66dcf1b

Please sign in to comment.