Skip to content

Commit 1f52d52

Browse files
committed
Docs: must give filename option to withSourceMaps
The documentation didn't mention that when compiling using eslisp as a `require`d module, one must pass a filename on the compiler's options object. Clarified that.
1 parent 67fffed commit 1f52d52

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

doc/source-maps.markdown

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ server, you might want to have a build step that adds the line—
4646
If you're using the eslisp compiler as a module, you can also use it to compile
4747
simultaneously to a source map and a JavaScript program:
4848
`require("eslisp").withSourceMap` takes the same arguments as the basic
49-
compiler, but returns a `{ code, map }` object.
49+
compiler, the differences are that it
50+
51+
- returns a `{ code, map }` object instead of just code, and
52+
- requires its second argument to be an object containing a `filename`
53+
property (which the source maps spec requires).
5054

5155
[1]: http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/

0 commit comments

Comments
 (0)