1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00
Commit graph

11 commits

Author SHA1 Message Date
Geoffrey Booth
fe5ff39ca2 [CS2] Fix v3 source map (#4671)
* Per discussion in #3075: if `sourceFiles` is unspecified, but `filename` is, use `filename`; output null instead of an empty string for `sources` or `sourceRoot`

* Update source map tests to reflect that now we return null instead of empty strings; check generated sources array

* Update source map documentation; still leave more obscure options undocumented

* Follow the TypeScript compiler’s example regarding v3SourceMap, but output empty strings instead of made-up filenames

* Have `sources` default to ‘<anonymous>’
2017-09-01 01:06:45 -07:00
Simon Lydell
d7e752bc5d Fix failing source map tests
This should have been done in commit 841b3cd2, but I forgot to. Since
that commit, `SourceMap::generate` returns an object instead of
`JSON.stringify()` of that object, but the tests still compared strings.

Fixes #4269.

Note: `SourceMap::generate` is only used internally, so its change in
return type is not a breaking change. The "public API" is unchanged.
2016-06-02 09:04:58 +02:00
Will Stamper
94c467b520 Quick spelling fixes 2014-08-26 20:41:32 -05:00
Jeremy Ashkenas
78d10f30a0 removing sourceColumn reset 2013-03-18 21:50:40 +08:00
Jeremy Ashkenas
6786bab2ba Big refactor of SourceMap class. Literate CoffeeScript. Purdy. 2013-03-18 19:23:05 +08:00
Jason Walton
f85d19b459 Rework API for sourcemap filenames and paths. 2013-03-07 21:26:09 -05:00
Jason Walton
d6e1a979e4 Fix sourceRoot and relative path for .coffee files in generated source maps. 2013-03-06 11:05:57 -05:00
Jeremy Ashkenas
9f614fedec CoffeeScript 1.6.0 2013-03-05 08:19:08 +13:00
Jason Walton
96785872cd Merge remote-tracking branch 'upstream/master' into sourcemaps
Conflicts:
	lib/coffee-script/coffee-script.js
	lib/coffee-script/command.js
	lib/coffee-script/nodes.js
	src/coffee-script.coffee
	src/command.coffee
	src/nodes.coffee
2013-03-04 09:25:55 -05:00
Nicolas Porter
88e02322e5 Fixed key name in source map, added coffee file to map sources
These are the modifications I had to do in order to get source maps working
in 27.0.1425.2 (Official Build 185250) canary. I haven't tested other
browsers.

I first looked at the V3 spec and a few examples, and I saw that the
`source` key of the source map should be called `sources`.

After doing the `source` to `sources` change, the coffee source and for
some odd reason the javascript file would not show up in the browser
dev tools (it was being fetched but not evaluated).

To fix this, I had to add the coffee source to the `sources` list in the
source map file.
2013-03-01 05:58:26 -05:00
Jason Walton
7073d18f23 Add source map support 2013-02-28 15:51:29 -05:00