I am using coffeescript. When declaring a global variable you have to used @ or share. What is the difference? You still have to put share or @ every global variable if you want to access it.
Looks like there’s an explanation here https://github.com/foxdog-studios/meteor-coffeescript-share, though I’ve not used this technique before.
@JamesLefrere yes. that’s my point. you have to put share keyword every global variable. In the link you post this is the example given
1_first.coffee
share.greet = (name) ->
console.log "Hello, #{ name }!"
2_second.coffee
share.greet 'World'
Why bother used share. When you can just used @ sign? like this one
1_first.coffee
@greet = (name) ->
console.log "Hello, #{ name }!"
2_second.coffee
@greet 'World'