June 20, 2011 2 Comments
But on a whim the other day I revisited it and thankfully now it does work on plain old WSH without any coaxing (not sure what changed, or what I was doing wrong last time). I took the full browser-based coffee-script.js and wrapped it with a simple *.wsf and batch file to handle command-line options.
It’s on github, natch:
To use it, invoke
coffee.cmd like so:
coffee input.coffee output.js
You can also pipe to and from it if you are so inclined via
stdin/out. Errors are written to
In the test directory there’s a version of the standard CoffeeScript tests which can be kicked off using test.cmd. Note that the test just attempts to compile the standard set of *.coffee test files but doesn’t execute them.
Hope it helps; comments appreciated!