Commit Graph

13 Commits

Author SHA1 Message Date
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
Martín Bigio 5196ad102d fix E2E tests
Reviewed By: @mkonicek

Differential Revision: D2526310

fb-gh-sync-id: 1c04f56073dc5b393a36b258c039fdfd85ab83a2
2015-10-09 07:59:02 -07:00
Martín Bigio 32b62ef055 Unbreak packager on oss master
Summary: @​public
This was a hard one, bare with me on the full story of what happened.

We recently started writting additional JS scripts in ES6 for the cli. These code needs to be transformed by babel before we execute it as we don't run node with `--harmony`. To do so we removed the `only` attribute on the `babel-register`. Turns out this broke the packager on oss as if no `only` not `ignore` parameter is specified babel will ignore `node_modules`. Since on oss when a project is created `react-native-github` is located inside of `node_modules` we started getting syntax errors.

The fix is to include separately all the different paths we need to make sure babel transforms each of them. We cannot simply have a single `babel-core/register` as we need to include paths that belong both to oss and internal only. So, we need to have multiple `register` invocations. Since babel does not accumulate the `only` you send on every invocation we need to build a small wrapper to do so.

Reviewed By: @frantic

Differential Revision: D2522426

fb-gh-sync-id: 379a7bb169c7d5cb3002268742de269238bba766
2015-10-08 17:37:27 -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