Created
November 13, 2011 16:14
-
-
Save aral/1362273 to your computer and use it in GitHub Desktop.
CoffeeScript to JSON script for OS X
This file contains 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
coffee --print --compile $1.coffee | sed '1s/^.//' | sed 's/ });/}/' | sed "s/\([^ '\"].*[^ '\"]\):/\"\1\":/" > $1.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With a bit more simplification and handling the input both from stdin and from a file name parameter: