Commit Graph

27 Commits

Author SHA1 Message Date
Spencer Elliott c1faabcdf6 Replace applescript with https://github.com/sindresorhus/opn
Summary: This allows opening the Chrome debugger on OS X, Linux, and Windows, and succeeds the previous PR which used [browser-launcher2](https://github.com/benderjs/browser-launcher2) and included a `--dangerouslyDisableChromeDebuggerWebSecurity` option: https://github.com/facebook/react-native/pull/2406

[opn](https://github.com/sindresorhus/opn) is cross-platform and much simpler than browser-launcher2 (since we don't have to manage the opened Chrome instance; the OS will just use the default instance).
Closes https://github.com/facebook/react-native/pull/3394

Reviewed By: mkonicek

Differential Revision: D2550996

Pulled By: frantic

fb-gh-sync-id: fa4cbe55542562f30f77e0a6ab4bc53980ee13aa
2015-10-23 11:32:35 -07:00
Martín Bigio dad45aa8f2 Fix `android` command
Summary: public

We've recently tweak `Config.js` so that it changes the current working directory to be able to keep track of it when running functions on the config instances. Turns out we can't do this as some commands rely on the current path (i.e.: `android`).

Although for this specific command we could fix the issue by using several `../` I feel like changing the cwd could bring other weird problems in the future, so I'm reverting the last update I did to D2565954.

Reviewed By: foghina

Differential Revision: D2572172

fb-gh-sync-id: 8cba62228b19a7729efcfe240a2f00e9becda61f
2015-10-23 09:53:24 -07:00
Felix Oghină 7e53ee1095 add upgrade cli command
Reviewed By: mkonicek

Differential Revision: D2559885

fb-gh-sync-id: 785bd6ad855da30c00b170e737a7dd0f3e756430
2015-10-23 03:37:28 -07:00
Martín Bigio 32aeeea313 Fix cli entry points
Reviewed By: frantic

Differential Revision: D2565954

fb-gh-sync-id: 6fde9e1dbefd71944e8f857e9a40619bf599ef75
2015-10-22 10:13:13 -07:00
Martin Konicek 55f8f3e370 Explanatory message when starting packager on Windows or unknown platform
Reviewed By: martinbigio

Differential Revision: D2564756

fb-gh-sync-id: 097ec541267a54a45d82116a03e4c22b8f49eb99
2015-10-22 07:10:27 -07:00
Martin Konicek c771fb3072 Fix runAndroid
Reviewed By: kmagiera, martinbigio

Differential Revision: D2565100

fb-gh-sync-id: 3be393fbd164997ebaa7a9b133e6ebb72059a615
2015-10-21 09:39:27 -07:00
Martín Bigio c6c97cbd9d Introduce default config
Reviewed By: frantic

Differential Revision: D2561344

fb-gh-sync-id: 651b8a199069f78e1ace2897ba4c0352aab7e3ea
2015-10-21 03:04:04 -07:00
Sam Swarr c15ec71238 Create script to generate NSURL builders for RN Routes
Reviewed By: martinbigio

Differential Revision: D2513000

fb-gh-sync-id: 4ff695b4d5ea55ae9bb21df4000d2dead5b7ff97
2015-10-20 13:49:31 -07:00
David Aurelio 523769faa7 Add `--verbose` flag to react native packager cli
Reviewed By: martinbigio

Differential Revision: D2517347

fb-gh-sync-id: 02e64f99120b6636d6e7649deb11d0b2f58d9285
2015-10-20 11:52:25 -07:00
Martín Bigio 02e39719c2 Move `run-android` to `private-cli`
Reviewed By: mkonicek

Differential Revision: D2544567

fb-gh-sync-id: 3c62f6c30b5be7f480d8f44a48fb551fc30d477e
2015-10-20 11:48:29 -07:00
Martín Bigio 8bff2d30ab Use `private-cli`'s server instead of `packager.js`
Reviewed By: vjeux

Differential Revision: D2542027

fb-gh-sync-id: e59f3be17590c1e256a903e04f2f0359c835c8b5
2015-10-16 15:01:23 -07:00
Martín Bigio 5977f494fc Allow user to configure transformer through cl argument
Reviewed By: frantic

Differential Revision: D2547435

fb-gh-sync-id: 77016ee5beba854a4cb58e9ac04b91a7dd76cf3e
2015-10-16 13:26:22 -07:00
Martín Bigio b00c49725c Use new cli on fbt string extraction script
Reviewed By: frantic

Differential Revision: D2534971

fb-gh-sync-id: b008c21c2194c59e8b2b83402841292cee8d85e8
2015-10-16 10:57:39 -07:00
Martin Bigio c0b5e6ed67 [react-native-cli] Move `new-library` command to `private-cli` 2015-10-16 11:20:29 -04:00
Jared Forsyth 0788e0b683 Devtools websocket
Summary: I thought this was already in here, but then it wasn't. It's connected to by RN [here](https://github.com/facebook/react-native/blob/master/Libraries/Devtools/setupDevtools.js#L17).
Closes https://github.com/facebook/react-native/pull/3431

Reviewed By: @​svcscm

Differential Revision: D2548286

Pulled By: @frantic

fb-gh-sync-id: ffd74426949196ca538c897c1a0d07d08b204630
2015-10-16 03:41:05 -07:00
Martín Bigio 36697ae6a1 Move android generator to private-cli
Summary: @​public

Lets also make this more generic to allow to generate the template for any platform code.

Reviewed By: @vjeux

Differential Revision: D2536821

fb-gh-sync-id: 6fb99c6dc546b8e1f9839c96a473dc08b0f5285c
2015-10-16 03:40:48 -07:00
Martín Bigio a102e6f587 Breaking change: Move `bundle` to `private-cli`
Summary: @​public

We need to start using the `private-cli` for the new asset system. Note this is a breaking change! People will have to upgrade their workflows/scripts to start using the new cli. Otherwise we'd need to build a thin adapter that is aware of both APIs which is something we;d like to avoid. The major API changes are:
  - API is now `entry-file` based instead of `url` based.
  - /s/--out/--bundle-output
  - /s/--out/--sourcemap-output

Also these parameters have no longer default values, you need to specify them. For instance, if you want to generate the sourcemaps you need to pass in the `--sourcemap-output` option

Lastly, additional project roots or asset roots need to be specified on the `rn-cli.config.js`.

Reviewed By: @frantic

Differential Revision: D2533877

fb-gh-sync-id: a45f9095fdf9442a9106ea7bb6a6b7f651d25273
2015-10-13 11:48:30 -07:00
Martín Bigio 12a68a8183 Move oss server to cli
Summary: @​public We're moving all the operation from `local-cli` to the `private-cli` and improving the code in the process. On this diff we introduce the `server` command which will be use to start the packager server. On follow up diffs we'll make changes to start using it from `local-cli`.

Reviewed By: @vjeux

Differential Revision: D2531443

fb-gh-sync-id: 5f7f12a250895265d83d1b076f6bbddb5cbdc257
2015-10-13 06:44:12 -07:00
Martín Bigio 31aacd78e8 Fix error message when invoking wrong command.
Summary: @​public

The message we were showing before didn't include correctly the commands the private cli had.

Reviewed By: @vjeux

Differential Revision: D2530164

fb-gh-sync-id: 2b00c74cb41441686587588632815c5948f3a864
2015-10-12 13:01:00 -07:00
Martín Bigio f39816eb38 Tweak cli config resolution
Summary: @​public
We need to tweak the resolution algorithm to start looking for the config file at the directory where the node script is running. This is needed to make development easier as internally we'll need 2 config files, one for open source and other one for internal use. This won't affect oss as for they we'll generate this file as part of the `init` command.

Reviewed By: @vjeux

Differential Revision: D2530161

fb-gh-sync-id: 17c21a56a26a91f2671197e8daa36c19adcea8ee
2015-10-12 12:02:50 -07:00
Andrei Coman 96dda4bf5f Revert D2531438
Differential Revision: D2531532

fb-gh-sync-id: c86bbcde3254df78f3dca88285ef1cd5a3563123
2015-10-12 08:36:27 -07:00
Martín Bigio d30384080a Bring back "download from server" perf optimization
Reviewed By: @frantic

Differential Revision: D2515566

fb-gh-sync-id: 25771888390154e9962d141f872cef85c08cd1d0
2015-10-12 06:39:44 -07:00
Martin Bigio 725e3eba6e Fix bad require
Reviewed By: @vjeux, @​swarr

Differential Revision: D2509919

fb-gh-sync-id: 8c3555d080a2b49c3a1effbe5c7e1d31a9a04767
2015-10-05 15:32:22 -07:00
Martín Bigio 7ad418a396 Move fbobjc bundle command to cli
Reviewed By: @frantic

Differential Revision: D2457072
2015-10-05 09:21:27 -07:00
Amjad Masad 9211b9b3cf Introduce `getOrderedDependencyPaths` that gets all concrete dependecy paths
Summary: @​public
Since we added packager-managed assets -- internally we still think of asset dependency as a single "module". In reality there are multiple files that represent this module. This becomes important with the `getDependencies` API which is used by Buck to inform it on what to rebuild. Since `getDependencies` deals with modules, and is more of an internal API, I've introduced a new one and would go on to deprecate this.

Reviewed By: @frantic

Differential Revision: D2487207
2015-09-29 18:34:21 -07:00
Amjad Masad ca007aabb4 Pass in the platform options when loading dependencies
Reviewed By: @jingc

Differential Revision: D2488262
2015-09-29 09:22:00 -07:00
Martín Bigio 833ca598bc Introduce react native CLI
Reviewed By: @frantic

Differential Revision: D2430522
2015-09-22 09:02:32 -07:00