Skip to content

Instantly share code, notes, and snippets.

@hden
Last active December 14, 2015 14:08
Show Gist options
  • Select an option

  • Save hden/5098183 to your computer and use it in GitHub Desktop.

Select an option

Save hden/5098183 to your computer and use it in GitHub Desktop.
Simple Literate CoffeeScript

Welcome to Lit

Lit is a Gist Reader for Literate CoffeeScript

This entire document is written in Literate CoffeeScript, source can be found at https://gist.github.com/hden/5098183

'use strict'

Lit is a writing tool inpired by Journo and bl.ocks.org. It has a few basic aims:

  • Write in literate coffee-script (~= markdown)
  • Publish to gist
  • View in flat HTML
  • Runs the literate coffee-script
  • Custom layouts
  • Search-engine friendly
  • Run tests
  • Automated browser tests, even better!

Write in Literate CoffeeScript

A post is written in Literate CoffeeScript (~= markdown) rendered client-side with strapdown.js. And excuted by the coffee-script compiler.

console.log 'Hey! you are writing in style'

Open your console and see for yourself. You can even manupulate DOM within a post!

console.log $('body')

Need an external library? Require.js is provided for your convenience.

View in flat HTML, runs the literate coffee-script

Blogging with your github account, a post is a gist. Just like bl.ocks.org index.coffee.md is the default name of a post. Follwing library are included for your convenience.

  • jQuery
  • Underscore
  • Backbone
  • D3.js

To read a post, simply visit http://liten.herokuapp.com/GIST. For example, visit http://liten.herokuapp.com/5098183 for this post.

ReleaseLog

  • Mar-25-'13:
    • Supports source mapping via coffee-script v1.6.2
    • Supports requirejs
  • Mar-7-'13
    • Initial Release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment