Commit Graph

6 Commits

Author SHA1 Message Date
Martin Konicek a477aec10d Rewrite 'react-native init' and 'react-native upgrade' without using Yeoman in preparation for templates support
Summary:
This is the manually imported version of https://github.com/facebook/react-native/pull/10786

This was mostly straigthforward by replacing the local-cli folder with the version I had in my local git checkout,
plus a few other files I listed with git diff --name-only.

Reviewed By: hramos

Differential Revision: D4201118

fbshipit-source-id: 4d0fb54b0edda9de1abba427958e420fd2ac105c
2016-11-18 18:28:51 -08:00
David Aurelio d7aa297762 Break out defaults, add flow for Config
Summary: In order to make `Config` and defaults available to our new code, I’ve added flow types and put default values into one shared modile

Reviewed By: cpojer

Differential Revision: D4044600

fbshipit-source-id: 875ed3ade69c5b22bb3c1b177e7bad732834d476
2016-10-22 06:13:42 -07:00
Mike Grabowski ab8c00e896 Attach origin of a 3rd party command
Summary:
Fixes #9236 as suggested.

<img width="505" alt="screen shot 2016-08-22 at 21 34 44" src="https://cloud.githubusercontent.com/assets/2464966/17868740/701a0ba0-68b0-11e6-87a5-4753d5bec688.png">

(just used dummy plugin that is actually deprecated to show the output)
Closes https://github.com/facebook/react-native/pull/9529

Differential Revision: D3784933

fbshipit-source-id: ee7d6a5b82a51b3dd9fa9e4cbca31bcf14761ae4
2016-08-29 08:43:49 -07:00
Mike Grabowski 993cfa1826 Bring back missing android command
Summary:
Fixes #9312

(Sorry for inconvenience, could've been removed by mistake!)

Bonus: projectName can be configured rather than always defaulting to package.json name, not sure if helpful, but just added it since we have a `default` function that makes sense in this case.
Closes https://github.com/facebook/react-native/pull/9525

Differential Revision: D3753610

Pulled By: bestander

fbshipit-source-id: 641872855b9865502f4055910262686edc4b504e
2016-08-23 04:28:36 -07:00
Mike Grabowski 0af640bfae Further RNPM integration
Summary:
This commit removes `rnpm` folder that we left during initial merge to keep the diff cleaner. The `core`, `link` and `install` have now the same directory structure as any other command to make development more natural for all of us.

From most notable differences:
1) the `src` folder is now gone. The new structure should make it easier for people to work with the stuff and also move us closer to 100% rnpm integration,
2) There's also no `package.json` present in any of the `rnpm` packages, since they are no longer standalone modules,
3) There's no `bugs.url` in link.js since main package.json of React doesn't specify it. Decided to hardcode it to facebook/react-native since it's really unlikely to change. If one would prefer to use pkg.bugs.url as before, a separate PR modifying package.json should be sent.
Closes https://github.com/facebook/react-native/pull/9509

Differential Revision: D3751115

fbshipit-source-id: 74ae8330f7634df0887ad676808f47eee4b8de85
2016-08-22 08:58:37 -07:00
Mike Grabowski e8b508144f Merge `rnpm cli` into react-native
Summary:
This is an initial step of rewriting the CLI interface to use `rnpm` one (commander, plugins etc.).

It's scope is to move all existing commands to use rnpm CLI interface, so that we get plugins, flags and our existing ecosystem working out of the box.

<s>This is still WIP and some of the commands are left commented out.</s>

For the `config` of `rnpm` (functions get info about project and dependency), <s>I am thinking we can merge them with</s> we decided to merge it with [`default.config.js`](e57683e420/local-cli/default.config.js (L33)), so they are available on the `new Config()` [instance](e57683e420/local-cli/cliEntry.js (L59)) (which means we don't have to change anything and current plugins, like runIOS and runAndroid can just start using it [w/o depending on any extra argument](https://github.com/grabbou/react-native/blob/e57683e420210749a5a6b802b4e
Closes https://github.com/facebook/react-native/pull/7899

Differential Revision: D3613193

Pulled By: bestander

fbshipit-source-id: 09a072f3b21e5239dfcd8da88a205bd28dc5d037
2016-07-30 09:13:46 -07:00