Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

More updates for CLI / new API #98

Merged
merged 4 commits into from
Apr 25, 2015
Merged

Conversation

zpao
Copy link
Contributor

@zpao zpao commented Apr 24, 2015

Turns out I missed a bunch of things in the CLI & new API. Bugs (I blame @zertosh for not catching them 😉), bad options. This makes things better. And then I wrote a readme.

cc @spicyj @amasad @jeffmo

- When using inlineSourceMap, result.code will now have the sourceMap
  encoded and appended. This matches more closely what we did in
  react-tools. We won't also return the raw sourcemap data (this matches
  what Babel does).
- Expose a new option sourceMap which will result in the sourceMap being
  in the result.
- Pre-JSONify the SourceMapGenerator instead of returning it directly.
- Make sure 'source.js' actually is the default for sourcemaps.
- Make sure the API works when no options are passed.
- Don't expose result directly from jstransform, only expose specific
  values.
Mostly this is to make sure source maps get a good filename, which will
mostly be correct-ish. It also makes the other defaults explicit.
Document the Advanced API as well as all the new stuff.
@zertosh
Copy link
Contributor

zertosh commented Apr 24, 2015

whatttttttttt? I left this disclaimer for a reason #81 (comment) 😛

Once I fixed the visitor names locally, it all ran smoothly :) ** For my uses, I don't use the CLI or modules.

zpao added a commit that referenced this pull request Apr 25, 2015
More updates for CLI / new API
@zpao zpao merged commit 32a016b into facebookarchive:master Apr 25, 2015
@zertosh
Copy link
Contributor

zertosh commented May 2, 2015

Found (another) bug #102

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants