Fixes to run on Node 0.4+, and better Readme #22

Open
wants to merge 8 commits into from

2 participants

@temsa

Hi, just made some small improvements over wheat to get it working on top of Node 0.4+.

I tried also to fix an issue which is "when viewing some article refering to a DOT file when Graphviz isn't installed, it crashes the blog..." but I didn't get how to catch the error, using :

  • running the child process in a try/catch.
  • listen to 'error' events on both the child process and main one.

The stack I have :

Error: EPIPE, Broken pipe
at Socket._writeImpl (net.js:138:14)
at Socket._writeOut (net.js:427:25)
at Socket.write (net.js:356:17)
at execPipe (/path/to/wheat/lib/wheat/renderers.js:41:18)
at Function.processFile (/path/to//wheat/renderers.js:281:11)
at next (/usr/local/lib/node/.npm/step/0.0.4/package/lib/step.js:51:23)
at /usr/local/lib/node/.npm/git-fs/0.0.5/package/lib/git-fs.js:93:23
at /usr/local/lib/node/.npm/git-fs/0.0.5/package/lib/git-fs.js:242:5
at [object Object].<anonymous> (fs.js:86:5)
at [object Object].emit (events.js:39:17)

Finally I used another solution for the moment, consisting in using cluster, which respawns the worker automagically when it crashes, but tht's not a pretty good solution !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment