Skip to content

Instantly share code, notes, and snippets.

@dyoder
Created November 19, 2014 20:13
Show Gist options
  • Save dyoder/36c26aafa9c401b3ebb0 to your computer and use it in GitHub Desktop.
Save dyoder/36c26aafa9c401b3ebb0 to your computer and use it in GitHub Desktop.
{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