Created
March 9, 2013 18:37
-
-
Save mathias/5125195 to your computer and use it in GitHub Desktop.
Is this how people are using node/npm modules with CoffeeScript classes?
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
require('coffee-script'); | |
var SimpleClass = require('./simple_class'); | |
var simple_class = new SimpleClass; | |
console.log(simple_class.foo()); |
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
class SimpleClass | |
foo: -> | |
"bar" | |
module.exports = SimpleClass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment