mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
You must declare your @exports using single-line ### comments: ### @export x ### x = 5 This involves some ugly and not 100% correct low-level source hackery, making some assumptions about the format that CoffeeScript generates.
16 lines
330 B
CoffeeScript
16 lines
330 B
CoffeeScript
'use strict'
|
|
|
|
### @export COFFEESCRIPT_EXPORTED2 ###
|
|
COFFEESCRIPT_EXPORTED2 = 456
|
|
|
|
# Another variable, which will stay in the var line.
|
|
x = 5
|
|
|
|
# This adds a utility function to the var line.
|
|
y = []
|
|
x in y
|
|
|
|
Tinytest.add "coffeescript - shared", (test) ->
|
|
test.equal share.coffeeShared, 789
|
|
test.equal sharedFromJavascript, 135
|