Files
meteor/packages/coffeescript/coffeescript_strict_tests.coffee
David Glasser d40ff521ef Support @export in CoffeeScript.
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.
2013-06-19 23:14:58 -07:00

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