Uh oh!
There was an error while loading. Please reload this page.
react-packager: Add ES6 import statement support to DependencyGraph. - #386
react-packager: Add ES6 import statement support to DependencyGraph.#386pilwon wants to merge 12 commits into
Conversation
jgable
commented
Mar 29, 2015
Does this just work for |
pilwon
commented
Mar 29, 2015
@jgable Yes, it supports all valid ES6 import syntaxes documented in the ES6 Language Specification. You can see the result from a test ran against a comprehensive list of valid syntaxes in this gist. |
amasad
commented
Mar 30, 2015
We also need to make the change here https://github.com/pilwon/react-native/blob/packager-es6-import-patch/packager/react-packager/src/DependencyResolver/haste/index.js#L28 |
pilwon
commented
Mar 30, 2015
@amasad Sure I can add that to PR. I have a question: Why does
|
…milar to DependencyGraph.
pilwon
commented
Apr 1, 2015
@amasad PR #368 addressed above questions. I merged the latest code into this PR branch. Fixes #368 (comment) & test passes. |
amasad
commented
Apr 1, 2015
Thanks, will take a look shortly. |
There was a problem hiding this comment.
can you add test where there is no space between the comma and the default?
There was a problem hiding this comment.
and a test where there are no spaces between the named imports and the {}
amasad
commented
Apr 1, 2015
Looks good, let's just add a couple more tests |
pilwon
commented
Apr 1, 2015
@amasad I updated test cases so most of them are in a more widely used spacing styles: importDefault,{Foo,BarasBaz,QuxasNorf}from'x';I still kept some different spacing style cases such as Also added an incorrect statement |
amasad
commented
Apr 2, 2015
Great, thanks for being very response, @pilwon! |
Summary: This PR teaches packager's `DependencyGraph` how to extract dependencies written with ES6 `import` statements. It fixes the issue where you are not able to write your app with ES6 `import` statements when your custom transformer (replacing the default [JSTransform](https://github.com/facebook/jstransform), for example, [babel](http://babeljs.io/)) already supports the ES6 `import` syntax. It will also be useful for [JSTransform](https://github.com/facebook/jstransform) later on once it implements `import` feature too. Closesreact#386 Github Author: Pilwon Huh <pilwon@gmail.com> Test Plan: runJestTests.sh
Summary: This PR teaches packager's `DependencyGraph` how to extract dependencies written with ES6 `import` statements. It fixes the issue where you are not able to write your app with ES6 `import` statements when your custom transformer (replacing the default [JSTransform](https://github.com/facebook/jstransform), for example, [babel](http://babeljs.io/)) already supports the ES6 `import` syntax. It will also be useful for [JSTransform](https://github.com/facebook/jstransform) later on once it implements `import` feature too. Closesreact#386 Github Author: Pilwon Huh <pilwon@gmail.com> Test Plan: runJestTests.sh
Summary: This PR teaches packager's `DependencyGraph` how to extract dependencies written with ES6 `import` statements. It fixes the issue where you are not able to write your app with ES6 `import` statements when your custom transformer (replacing the default [JSTransform](https://github.com/facebook/jstransform), for example, [babel](http://babeljs.io/)) already supports the ES6 `import` syntax. It will also be useful for [JSTransform](https://github.com/facebook/jstransform) later on once it implements `import` feature too. Closesreact/react-native#386 Github Author: Pilwon Huh <pilwon@gmail.com> Test Plan: runJestTests.sh
This PR teaches packager's
DependencyGraphhow to extract dependencies written with ES6importstatements.It fixes the issue where you are not able to write your app with ES6
importstatements when your custom transformer (replacing the default JSTransform, for example, babel) already supports the ES6importsyntax.It will also be useful for JSTransform later on once it implements
importfeature too.