CS all the way!

This commit is contained in:
yangit
2013-05-17 10:30:19 +08:00
parent d3cf80ec02
commit 6c7bb7d4ab
13 changed files with 243 additions and 26 deletions
+20
View File
@@ -0,0 +1,20 @@
#This is a boilerplate to make this file both node.js and AMD (require.js) module compatible.
({ define: (
if typeof define == "function"
define
else
(F)->
F(require, exports, module)
)}).define (require, exports, module)->
#Write your code here as usual
#I.e. require parent module
#NOTE: I did not figure out how to require coffee-script here. As this has to be both Node.js and require.js compatible syntax. And they disagree on how to do that. Anyway we can stick with .js parent modules for a while.
parent = require('cs!./parentModule');
module.exports =
{
foo: (message)->
#use parent module
console.log parent.parentFoo message
}