Commit Graph

24 Commits

Author SHA1 Message Date
David Glasser
5218d0e46b don't let coffeescript break stack traces 2015-05-22 19:03:09 -04:00
Maxime Quandalle
57779c7cbe Upgrade CoffeeScript from 1.6.3 to 1.7.1
Assumptions about vars in `compile-coffeescript.js` remains valid.
2014-02-12 15:47:06 -08:00
David Greenspan
6300a72381 add missing semicolon
just happened to notice it
2014-01-27 14:02:01 -08:00
David Glasser
f65b1cd2ae Remove backwards-compatibility code
There's no need to be backwards-compatible here with something that has
never worked (or at least hasn't worked since 0.6.5).
2013-12-19 17:00:58 -08:00
Mitar
a21f0d2e58 Pass "bare" option when using CoffeeScript as well. 2013-12-19 16:54:03 -08:00
Maxime Quandalle
c66b8e3db5 Style tweaks 2013-09-12 14:29:50 -07:00
Maxime Quandalle
8df6553ce2 Add a literate handler in the coffeescript package
Add .coffee.md handling tests
2013-09-12 14:29:50 -07:00
David Glasser
e4c568b1e1 Merge exports list with package variables in slice JSON.
This implies that all exports are package variables, which made underscore,
jquery, and htmljs (which explicitly assigned to fields on the global variable)
break. We now properly encapsulate these packages (except for window.jQuery,
which we let sneak out because bootstrap wants it).  This means that packages
that want _ need to use underscore, and packages that want $ need to use jquery.
Also, you can't use _ in minimongo $where any more (matching mongod).
2013-07-25 18:54:42 -07:00
David Glasser
95c8384e3b Get rid of linkerFileTransform. 2013-07-25 18:54:41 -07:00
David Glasser
23d73f0732 fix coffeescript. test-packages passes! 2013-07-25 18:54:41 -07:00
David Glasser
177a5684c9 checkpoint for using source maps in jsimage.load
syntax error parsing is broken, will fix
2013-07-12 10:11:31 -07:00
David Glasser
faf49921be replace barely-used lineForLine/includePositionInErrors with use of source maps.
Note that this is only triggered when coffeescript manages to output invalid JS,
which should be unlikely.

This does remove the feature where lines and columns were suppressed for parse
errors in the output of template compilation. but (a) that shouldn't happen,
and (b) we'll fix this by implementing source maps for spacebars.
2013-07-12 10:11:31 -07:00
David Glasser
269434a44b Inline source code in source maps instead of keeping another data structure. 2013-07-12 10:11:31 -07:00
David Glasser
a13f330983 All sourceMap fields in data structures are now strings, not generators. 2013-07-12 10:11:30 -07:00
David Glasser
4e18439ae6 Source maps for coffeescript. 2013-07-12 10:11:30 -07:00
David Glasser
d823e57049 Rip @unit out of Meteor.
It's not used, it doesn't fully work yet, it's incompatible with the static
analysis, and it will make implementing CoffeeScript source maps significantly
more difficult.
2013-07-12 10:11:30 -07:00
David Glasser
9bce443701 coffeescript: ensure added code goes after 'use strict' 2013-06-20 11:06:33 -07:00
David Glasser
974bc116be Refactor coffeescript export support: move CS-specific parsing
into CS package.
2013-06-20 11:06:33 -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
David Glasser
8a7b1ddf35 Merge branch 'devel' into linker.
Conflicts:
	meteor
	packages/absolute-url/.gitignore
	packages/accounts-base/package.js
	packages/accounts-oauth/package.js
	packages/audit-argument-checks/.gitignore
	packages/coffeescript/.gitignore
	packages/coffeescript/package.js
	packages/localstorage-polyfill/.gitignore
	packages/oauth1/package.js
	packages/oauth2/package.js
	packages/random/random.js
	scripts/generate-dev-bundle.sh
	tools/packages.js
	tools/run.js
	tools/server/server.js
2013-05-28 15:10:48 -07:00
Geoff Schmidt
ed18c6ffb5 Comprehensive build-time error reporting system. In particular: if an error occurs, the build will try to continue to identify any other potential problems so that they can be flagged too. Syntax errors are captured and dealt with programmatically, rather than just being echoed to stderr by node. Stack traces are parsed to pull out file and line information, and a distinction is made between the 'user' and 'internal' portions of the stack. All of this is at build time only -- it has not been extended to (run-time) server or browser yet. Also, no source maps yet, though line numbers are computed correctly for units within the linker. 2013-05-13 11:52:43 -07:00
Geoff Schmidt
4bff34a680 Port 'less' package to new plugin API 2013-05-13 11:52:43 -07:00
Geoff Schmidt
8c72a28e35 Port coffeescript package to new plugin API 2013-05-13 11:52:43 -07:00