Add sourceMap option to react-tools transform#910
Merged
zpao merged 2 commits intofacebook:masterfrom Jun 16, 2014
Merged
Conversation
andrewdavey
added a commit
to andrewdavey/grunt-react
that referenced
this pull request
Jan 16, 2014
Waiting for this facebook/react#910 Usage: ``` grunt.initConfig({ browserify: { options: { transform: [ require('grunt-react').browserify.withSourceMaps ], debug: true }, app: { src: 'index.jsx', dest: 'public/index.js' } } }); ``` Transformed JSX JavaScript output has inline source map comments appended. Browserify will then combine all these source maps when bundling.
This was referenced Jan 16, 2014
Closed
Member
|
Awesome. Could we get the same thing in JSXTransformer? cc @benjamn |
main.js
Outdated
Collaborator
There was a problem hiding this comment.
nit: no spaces within brackets, please
Collaborator
|
Do you mind rebasing? Sorry for the delay on this. |
Contributor
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Allow tools like grunt-react to include inline source maps in the
generated JavaScript. Browserify can then combine these source maps when
bundling everything together.
Usage:
```
var transform = require('react-tools').transform;
var output = transform(jsxContent, {
sourceMap: true,
sourceFilename: 'source.jsx'
});
```
The `output` will have an inline source map comment appended.
Contributor
Author
|
Done 😄 |
Member
|
Cool, this looks great. Thanks a lot! |
zpao
added a commit
that referenced
this pull request
Jun 16, 2014
Add sourceMap option to react-tools transform
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow tools like grunt-react to include inline source maps in the
generated JavaScript. Browserify can then combine these source maps when
bundling everything together.
Usage:
The
outputwill have an inline source map comment appended.