Skip to content

Instantly share code, notes, and snippets.

@davidbanham
Created January 28, 2014 22:34
Show Gist options
  • Save davidbanham/8678004 to your computer and use it in GitHub Desktop.
Save davidbanham/8678004 to your computer and use it in GitHub Desktop.
A wrapper to run your .coffee files via node
// Include the CoffeeScript interpreter so that .coffee files will work
var coffee = require('coffee-script');
// Explicitly register the compiler if required. This became necessary in CS 1.7
if (typeof coffee.register !== 'undefined') coffee.register();
// Include our application file
var app = require(process.argv[2] || './app.coffee');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment