facebook/react — pull request #833 by andrewdavey (2014-01-07 11:00:43+00:00)
Title: Add source map generation to bin/jsx

Work in progress for #766

Assuming a directory contains `foo.jsx`, running `jsx -x jsx --source-map . .` will generate `foo.js` and `foo.js.map`.

The generated `foo.js` has the `//# sourceMappingURL=foo.js.map` comment appended.

Current limitations:

- To keep relative URL simple the source file, generated JS and map must be in the same directory.
- The source file can't have the extension `.js`. I'm using `.jsx` instead.
- Nasty hack to commoner required to get the output directory.