Skip to content

Instantly share code, notes, and snippets.

@wlaurance
Forked from aral/coffeetojson.sh
Created February 29, 2012 21:47
Show Gist options
  • Save wlaurance/1944691 to your computer and use it in GitHub Desktop.
Save wlaurance/1944691 to your computer and use it in GitHub Desktop.
CoffeeScript to JSON script for OS X
coffee --print --compile $1.coffee | sed '1s/^.//' | sed 's/ });/}/' | sed "s/\([^ '\"].*[^ '\"]\):/\"\1\":/" > $1.json
@wlaurance
Copy link
Author

RC2

cat $1 | sed '1s/&.//' | sed 's/});/}/' | sed 's/({/{/' | sed "s/\([^ '\"].*[^ '\"]\): /\"\1\": /1" | sed '/^$/d' > $2

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