Created
November 19, 2014 20:13
-
-
Save dyoder/36c26aafa9c401b3ebb0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{liftAll} = require "when/node" | |
{call} = require "when/generator" | |
{readFile, writeFile} = (liftAll require "fs") | |
marked = require "marked" | |
call -> | |
try | |
buffer = yield readFile "my-blog-post.md" | |
html = marked buffer.toString() | |
yield writeFile "my-blog-post.html", html | |
catch error | |
console.log "#{error}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment