Skip to content

Instantly share code, notes, and snippets.

@brianleroux
Created July 28, 2011 16:53
Show Gist options
  • Save brianleroux/1111936 to your computer and use it in GitHub Desktop.
Save brianleroux/1111936 to your computer and use it in GitHub Desktop.
pls make this better
// seems the coffee method run is the way to go but I was using it wrong (I think)
require('fs').readFile('app.coffee', function(err, code) {
// anyhow, this works but is certianly not ideal
eval(require('coffee-script').compile(code.toString('utf8')))
})
// also: I do *not* want a compile ceremony leaving .js detritus all over my project if possible!
@sintaxi
Copy link

sintaxi commented Jul 28, 2011

@brianleroux I think you found your answer :)

@brianleroux
Copy link
Author

Holy webscale batman! I had no idea coffeescript could be required into node after it had been required in. Thx @izs

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