Commit Graph

6 Commits

Author SHA1 Message Date
David Glasser
e33694874d Test slices now never contain exports.
@export is now an error in test slices.

This is preparation for ensuring that any slice with exports has at least
"Package.foo = {}"; without this commit, both the use and test slice would (with
that change) try to overwrite Package.foo.

Remove the attempt to allow @export in 'use strict' CoffeeScript files:
ECMAScript 'use strict' is fundamentally incompatible with our implementation of
exports, and it was probably a bug that this used to work at all.
2013-06-26 12:26:12 -07:00
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
David Glasser
b68483e31b Implement package-level shared variables for CoffeeScript.
CoffeeScript doesn't allow you to assign to global variables using variable
assignment syntax (though you can assign properties to the global object), which
is the way to create package-level shared variables in Meteor. This commit
provides a CoffeeScript-specific to share variables between files in a package
without adding a redundant alternative for JavaScript files: simply assign
properties on the symbol `shared`.
2013-06-18 09:59:42 -07:00
Andrew Wilcox
b1a27cd90c test that CoffeeScript can set global vars using this 2013-03-23 13:07:22 -07:00
David Greenspan
840dc7d8a5 make coffeescript tests fail if .coffee file doesn't run 2012-04-25 17:36:45 -07:00
Nick Martin
b0af1751c7 Add coffeescript tests. 2012-04-25 13:35:26 -07:00