mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-03 04:29:40 +00:00
Helpers.js\moment.js included. Alogos are still BROKEN. I'm deploying them here for testing.
20 lines
No EOL
672 B
CoffeeScript
20 lines
No EOL
672 B
CoffeeScript
#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('./parentModule');
|
|
|
|
module.exports =
|
|
{
|
|
foo: (message)->
|
|
#use parent module
|
|
alert parent.parentFoo message
|
|
} |