Commit Graph

214 Commits

Author SHA1 Message Date
David Aurelio cc4a5d39db Add unbundling to packager
Reviewed By: tadeuzagallo

Differential Revision: D2707409

fb-gh-sync-id: 30216c36066dae68d83622dba2d598e9dc0a29db
2015-12-01 08:48:30 -08:00
David Aurelio 32fa0b7fa1 Move bundle output formats to their own files
Reviewed By: tadeuzagallo

Differential Revision: D2702834

fb-gh-sync-id: fca308c5078a11924e071077822fb77d762bd564
2015-11-30 09:31:27 -08:00
Bram 710b443af1 bugfix #3997: react-native bundle not working on windows 10
Summary: fixes https://github.com/facebook/react-native/issues/3997

the root cause is in

Mon, 09 Nov 2015 13:22:47 GMT ReactNativePackager:SocketServer uncaught error Error: listen EACCES C:\Users\donald\AppData\Local\Temp\react-packager-9248a9803ac72b509b389b456696850d

This means that the socket server cannot create the socket.

cfr https://gist.github.com/domenic/2790533 the socket name is not a valid windows socket name.
Closes https://github.com/facebook/react-native/pull/4071

Reviewed By: mkonicek

Differential Revision: D2699546

Pulled By: davidaurelio

fb-gh-sync-id: 6c6494c14c42bb17506b8559001419c9f85e91e3
2015-11-27 08:22:29 -08:00
Christopher Dro cfd9f65cfe Add space after url. Fixes #4292
Summary: Closes https://github.com/facebook/react-native/pull/4297

Reviewed By: svcscm

Differential Revision: D2686725

Pulled By: foghina

fb-gh-sync-id: 3679c7e8d9b3e4c12ef42628e348c6a6d5cc32d7
2015-11-23 12:31:30 -08:00
Sebastian Markbage 43f18ffd08 Add infra for Prepack build option
Summary: This adds a build option for using Prepack (an experimental packager) to
build a bundle. It doesn't actually take on the npm package dependency
because it's not published/open source (yet).

This will be used while we experiment and should be maintained as the
build system changes so that we can continue getting fresh builds.

I found that saveBundleAndMap and processBundle were over abstracted and
got in my way so I inlined it and removed the unit tests because the unit
test was testing trivial code that is likely to change interface.

I went with a separate build phase and a separate Bundle class even though
there are a lot of commonalities. I imagine that the requirements for
Prepack will continue to diverge. Especially for source maps but a larger
refactor could try to unify these a bit more. The fact that modules are
wrapped before the write phase seems to be an unfortunate architecture
that makes this difficult.
Closes https://github.com/facebook/react-native/pull/4226

Reviewed By: amasad

Differential Revision: D2673760

Pulled By: sebmarkbage

fb-gh-sync-id: 299ccc42e4be1d9dee19ade443ea3388db2e39a8
2015-11-20 20:19:25 -08:00
DengYun 6124298dd7 bugfix part 1 for #4124: react.gradle cause a error on windows when building release apk.
Summary: ```
* What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets'.
> A problem occurred starting process 'command 'react-native''
```

Can be solved by this patch.
Closes https://github.com/facebook/react-native/pull/4209

Reviewed By: svcscm

Differential Revision: D2669661

Pulled By: foghina

fb-gh-sync-id: 951b7eb9dd3121de607cf5eb3dfb3af44cdf5994
2015-11-18 12:23:28 -08:00
James Ide b838b4617c Compress HTTP responses from the packager
Summary: The packager was adding compression middleware too late in the stack. This makes things a little faster especially if you're loading through dynamic DNS for example.
Closes https://github.com/facebook/react-native/pull/4121

Reviewed By: svcscm

Differential Revision: D2664373

Pulled By: frantic

fb-gh-sync-id: 46cce81ff6d9e4e71e1718d7e96b58449c248bc1
2015-11-17 12:22:29 -08:00
Pasindu Perera 83c9741dc9 Fixed Typo
Summary: Closes https://github.com/facebook/react-native/pull/4160

Reviewed By: svcscm

Differential Revision: D2663767

Pulled By: mkonicek

fb-gh-sync-id: 1e61c9a96247eec0cb22523989a31b2ad2de0827
2015-11-17 09:49:27 -08:00
Tadeu Zagallo 0b46a0c13b Add a naive WPO implementation
Summary: public

RFC: The minifier haven't been stripping dead-code, and it also can't kill unused
modules, so as a temporary solution this inlines `__DEV__`, kill dead branches
and kill dead modules. For now I'm just white-listing the dev variable, but we
could definitely do better than that, but as a temporary fix this should be
helpful.

I also intend to kill some dead variables, so we can kill unused requires,
although inline-requires can also fix it.

Reviewed By: vjeux

Differential Revision: D2605454

fb-gh-sync-id: 50acb9dcbded07a43080b93ac826a5ceda695936
2015-11-17 03:39:28 -08:00
Tadeu Zagallo 136d79f4d6 Fix set log block in template
Summary: public

The log register function was updated, but the test example wasn't.

Reviewed By: javache

Differential Revision: D2658417

fb-gh-sync-id: 9ad27ec02eb437e0262e71897ff1a58a97e88b6d
2015-11-16 10:08:08 -08:00
James Ide 88a92f8f52 Add back projectRoots option to packager CLI command
Summary: Adding this to the CLI again (like: 8e7cfcd053 (diff-75e3fc051b7c5100b4681e8a8f62615bL45))

Fix #2390
Closes https://github.com/facebook/react-native/pull/4065

Reviewed By: svcscm

Differential Revision: D2652032

Pulled By: mkonicek

fb-gh-sync-id: 7162983c24f6e08ecc8f7f410e9b756471d88631
2015-11-13 08:00:29 -08:00
Martin Konicek 2681200ed6 More descriptive comment in default.config.js
Reviewed By: foghina

Differential Revision: D2575388

fb-gh-sync-id: b28e9ccd7a89409d4d755cfb8d771e5a9e1981b9
2015-11-12 07:43:25 -08:00
Tadeu Zagallo 6766d5ed54 Temporarily disable cli tests
Summary: public

The tests are failing, disable it temporarily until it's fixed.

Reviewed By: mkonicek

Differential Revision: D2641730

fb-gh-sync-id: e8e2a8f3e67df197570484d6a8b1d16be08ce1d7
2015-11-12 07:05:01 -08:00
Alex Kotliarskyi a710eb3292 Try to guess user's editor
Summary: public

Currently works only on OSX and supports Sublime (2/3) and Atom.

The idea is to get the list of running processes and try to find some well-known
editors there.

Reviewed By: vjeux

Differential Revision: D2642865

fb-gh-sync-id: d346902662354b2f633651a9bc54368146133651
2015-11-11 13:47:34 -08:00
Tadeu Zagallo b907f40957 Fix breakages when upgrading to babel 6
Reviewed By: vjeux

Differential Revision: D2628092

fb-gh-sync-id: 077a3572fe8b261d390be2bdc32d9d06c2b80a01
2015-11-10 10:56:48 -08:00
Felix Oghina 96b76fc85f fix run-android looking for packager in wrong place
Summary: Possibly leftover from the CLI migration.

public

Reviewed By: vjeux

Differential Revision: D2626589

fb-gh-sync-id: 22e44b7276bca136cde375a6d6d5af3bf0811767
2015-11-06 12:05:28 -08:00
Satyajit Sahoo 6c11d18360 Prevent destroying activity on runtime changes
Summary: From http://developer.android.com/guide/topics/resources/runtime-changes.html

> Some device configurations can change during runtime (such as screen orientation, keyboard availability, and language). When such a change occurs, Android restarts the running Activity (onDestroy() is called, followed by onCreate()). The restart behavior is designed to help your application adapt to new configurations by automatically reloading your application with alternative resources that match the new device configuration.

However, in a React Native app, there is only a single activity for the entire app, unlike a single activity per screen in Android, and resources are not specific to orientation etc. Destroying activity means reloading the entire app. Most of the time, this is not the intended behaviour, and can cause data loss for the user if the developer doesn't disable it explicitly. I'm proposing to disable it by default.
Closes https://github.com/facebook/react-native/pull/3813

Reviewed By: svcscm

Differential Revision: D2616083

Pulled By: foghina

fb-gh-sync-id: 8794e436f61581ff0bf569b1b112845cae77b688
2015-11-04 10:47:30 -08:00
Kai Wood 635edd9ccc Support line number arguments for RubyMine
Summary: RubyMine's command line launcher `mine` supports the same syntax as `mate` for jumping to line numbers. This patch adds it to the list.
Closes https://github.com/facebook/react-native/pull/3883

Reviewed By: svcscm

Differential Revision: D2615422

Pulled By: pcottle

fb-gh-sync-id: 79a70f524f852ba8eb4803e6abc6970abbf02b61
2015-11-04 07:56:27 -08:00
Martín Bigio eed38e9163 Retry landing D2590327
Reviewed By: swarr

Differential Revision: D2613446

fb-gh-sync-id: d38ad4e7cf66d25c69f92b330dd0feed0eeb23df
2015-11-03 17:45:28 -08:00
Jan Kassens 2519d25992 Fix undefined var exception
Summary: This check to see if `require` exists was bad as it throws an error for an
undefined reference in case it doesn't exist.
Closes https://github.com/facebook/react-native/pull/3845

Reviewed By: svcscm

Differential Revision: D2613368

Pulled By: martinbigio

fb-gh-sync-id: 7b1d0f38e4af9bce81356a613d6105f2c00c7ed7
2015-11-03 17:11:29 -08:00
Martin Konicek 441c464c2b Make it clear Android emulator is the quickest way to get started
Summary: A lot of people try to use a device as the very first thing when trying
out React Native. I've observed this at the developer workshop in Prague
and on Twitter.

However, developing on pre-API 21 devices is quite involved:
https://facebook.github.io/react-native/docs/running-on-device-android.html

I'm thinking we could recommend installing Android together with Android
studio. Android studio installs HAXM for you (hardware acceleration, without
this Google emulators are useless) and also creates and starts emulators.
So it would be quite a smooth experience similar to pressing 'Run' in Xcode.

We'd just need to integrate with Gradle so that installing the app also starts
the packager. I think that's something we should do in any case.

Probably an even better option is to build a React Native-specific tool that
lets you do everything you need: opens the Android SDK Manager, creates and
starts emulators, detects whether you have Genymotion and opens it, upgrades
node and npm etc.

public

Reviewed By: vjeux

Differential Revision: D2604774

fb-gh-sync-id: c7ffb701b4e5209815faf652926937c22943be95
2015-11-03 04:05:27 -08:00
Martin Konicek 4411ad49a4 More descriptive error message when Gradle build/install fails
Summary: Inspired by: https://twitter.com/geirmanc/status/660275638637477889

There are many reasons why the Gradle build could fail and the best
thing to do is to read the error message.

We can provide some hints in the most common cases though.

public

Reviewed By: vjeux

Differential Revision: D2604747

fb-gh-sync-id: 1aa83abb9ec823c03814dcc31d630a8f1914cf5c
2015-11-03 03:48:26 -08:00
Chris Geirman b752d79838 update pro tip to clarify how to configure zsh shell
Summary: Thanks to alex_frantic for helping me solve this problem...
https://twitter.com/alex_frantic/status/657276624220659712
Closes https://github.com/facebook/react-native/pull/3853

Reviewed By: svcscm

Differential Revision: D2609728

Pulled By: pcottle

fb-gh-sync-id: edb20fcbaff0289a2363eedebd84d20c2d3b39aa
2015-11-02 21:33:31 -08:00
Tadeu Zagallo ccd90e25c1 Convert remaining uses of alloc] init] to new]
Summary: public

We moved to using `new` instead of `alloc] init` but there was still some calls
left.

Reviewed By: javache

Differential Revision: D2604679

fb-gh-sync-id: ff7300ecbedb55dd5e93873592598810c9b87808
2015-11-02 08:03:17 -08:00
Aaron Chiu c4d780d904 fix packager compilation error
Differential Revision: D2604171

fb-gh-sync-id: 11decf6c8b689b903bd9c4fd9aca2ea626cc1d43
2015-10-31 06:14:26 -07:00
Tadeu Zagallo 010380cca6 Fix CPU profiler upload
Summary: public

Changes were made on the packager that broke the CPU profile upload route,
fix it.

Reviewed By: martinbigio

Differential Revision: D2585184

fb-gh-sync-id: 206744f92d403d6851a69891dfac0c4c11bf1b7e
2015-10-30 14:46:00 -07:00
Adrov Igor 95972cfd08 fix error handling in packager
Summary: Currently on error I have following output:
```
 ERROR  Packager can't listen on port 8081
Most likely another process is already using this port
Run the following command to find out which process:

   lsof -n -i4TCP:8081

You can either shut down the other process:

   kill -9 <PID>

or run packager on different port.

See http://facebook.github.io/react-native/docs/troubleshooting.html
for common problems and solutions.
/Users/nucleartux/Work/projects/react-native/local-cli/server/server.js:90
    if (error.code === 'EADDRINUSE') {
             ^

TypeError: Cannot read property 'code' of undefined
    at process.<anonymous> (/Users/nucleartux/Work/projects/react-native/local-cli/server/server.js:104:14)
    at emitOne (events.js:77:13)
    at process.emit (events.js:169:7)
    at process._fatalException (node.js:211:26)
```
Closes https://github.com/facebook/react-native/pull/3765

Reviewed By: svcscm

Differential Revision: D2595537

Pulled By: martinbigio

fb-gh-sync-id: e11ec2e6e8794bf5fe7570e27cd327777d8b300c
2015-10-29 08:59:02 -07:00
Martín Bigio 89f1e6732e Fix comments on .bat file 2015-10-28 21:36:07 -04:00
Martín Bigio 15006cf0b4 Add option to indicate bundle encoding
Summary: public

To improve cold start performance we want to be able to avoid decoding the bundle at all. To make that happen we need to be able to generate a bundle encoded on `ucs2`. This diff adds support for indicating the encoding the Packager should use for bundling.

Reviewed By: davidaurelio

Differential Revision: D2582365

fb-gh-sync-id: 905384272a668910c57a1a2ca6d1b723c39233f8
2015-10-28 13:20:28 -07:00
Martín Bigio 44af0d3dec Infer platform from extension
Summary: public
Aparently this used to work on 0.11, lets fix it :)

Reviewed By: foghina

Differential Revision: D2557719

fb-gh-sync-id: dcbca077431c1356c89dfc55b71eecff64c7ad3d
2015-10-27 17:47:28 -07:00
Martin Konicek 4e5a2bc079 Introduce react-native link
Reviewed By: martinbigio

Differential Revision: D2575858

fb-gh-sync-id: 13be5a0411db5cd753ebbac3799a7a0139c0f952
2015-10-27 11:22:28 -07:00
Martin Konicek 3c730b1ce2 Revert "Add folders to attempt to unblock sync"
We don't need these files anymore, the sync from the internal
fb repo to github is working now.

This reverts commit 746ebc6a79.
2015-10-26 22:48:10 +00:00
Martín Bigio bcf762af60 Move files from `packager/` to `local-cli`
Summary: public

This is not only to put the files on a place where it makes more sense but also to allow to use ES6 features on them as `/packager` is not whitelisted on `babel`.

Reviewed By: mkonicek

Differential Revision: D2577267

fb-gh-sync-id: b69a17c0aad349a3eda987e33d1778d97a8e1549
2015-10-26 15:38:14 -07:00
Martín Bigio 2856be9a07 Bring back global cli module check
Summary: public

This was introduced by vjeux on 0a5967d and removed on 0686b01. I guess it was removed accidentally as this this is a nice warning to have that should prevent n00bs from commiting a common mistake

Reviewed By: frantic

Differential Revision: D2563885

fb-gh-sync-id: 9fae145bbec587514f118d1d28d076b1d82f0630
2015-10-26 15:36:29 -07:00
Martín Bigio 849aa4dae6 Move `private-cli` commands to `local-cli`
Summary: public

We cannot remove `local-cli` because is referenced by the global cli explicitly. If we do so, people would have to upgrate this global thin cli which will cause some pain. So, lets move `private-cli` commands into `local-cli` instead.

Reviewed By: frantic

Differential Revision: D2571983

fb-gh-sync-id: 712c29430203660fb6f0d5f23813cb2a7156ee48
2015-10-26 15:36:04 -07:00
Martin Konicek 746ebc6a79 Add folders to attempt to unblock sync 2015-10-26 17:22:39 +00:00
Martin Bigio 47926abca9 Use default asset roots on `default.config.js`
Summary: We need to cherry pick this one as well.

cc ide
Closes https://github.com/facebook/react-native/pull/3640

Reviewed By: svcscm

Differential Revision: D2577961

Pulled By: mkonicek

fb-gh-sync-id: 3368fc02a931e0f259f3baa6706bd7d8586b0fbf
2015-10-23 18:49:25 -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
Alex Kotliarskyi be70e32de2 Generate bundle and assets when building via Xcode
Summary: This integrates React Native into Xcode's build process, which lets us automatically handle bundling and packaging image assets.

Tested the script via https://github.com/frantic/ReactNativeAssetsExample

Loaded from packager:
<img width="432" alt="screen shot 2015-10-19 at 3 11 12 pm" src="https://cloud.githubusercontent.com/assets/192222/10593447/be5bc7e8-7678-11e5-8c70-ecc2a1ee24fc.png">

Loaded from offline bundle:
<img width="432" alt="screen shot 2015-10-19 at 3 10 58 pm" src="https://cloud.githubusercontent.com/assets/192222/10593448/be5d5194-7678-11e5-8b02-d492a26cfb81.png">

Android:
<img width="639" alt="screen shot 2015-10-19 at 3 11 20 pm" src="https://cloud.githubusercontent.com/assets/192222/10593449/be5de2d0-7678-11e5-8d3c-0378fc447f15.png">
Closes https://github.com/facebook/react-native/pull/3523

Reviewed By: mkonicek

Differential Revision: D2557923

Pulled By: frantic

fb-gh-sync-id: 19957e255993696e793b0162662772efd89f5c1a
2015-10-21 18:44: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
Martín Bigio 8e7cfcd053 Kill unused files
Reviewed By: frantic

Differential Revision: D2561113

fb-gh-sync-id: a81fece0a948485e12bff7ec146e39d890664887
2015-10-21 03:04:01 -07:00
Martín Bigio 088c193a22 Start packager through cli
Reviewed By: frantic

Differential Revision: D2561066

fb-gh-sync-id: 1743153a84947da5d0e54aca7e1919cf5df3a965
2015-10-21 03:03:59 -07:00
Martín Bigio 5c4bb894bf Clean up cli.js
Reviewed By: frantic

Differential Revision: D2546201

fb-gh-sync-id: 214a12213674749e1b7270ccbe90fd3330c9cb1e
2015-10-21 03:03:57 -07:00
Felix Oghină 71adc24974 Revert "Update rn-cli.config.js"
This reverts commit 8d592650c9.
2015-10-21 11:02:08 +01: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
Martin Konicek 4ac3c4a853 Make 'npm start' an alias for 'packager.sh', don't silently no-op on Windows
Reviewed By: martinbigio

Differential Revision: D2559772

fb-gh-sync-id: d1cd2874c32459d6e1f0af7d084c3559ebc145aa
2015-10-20 10:15:22 -07:00
Martin Konicek e612690413 Add license headers to local-cli
Reviewed By: martinbigio

Differential Revision: D2559969

fb-gh-sync-id: d8cd52435213729ff73a1f039eb0378b28f8d10e
2015-10-20 09:55:21 -07:00
Martín Bigio 8d592650c9 Update rn-cli.config.js 2015-10-19 19:07:34 -04:00
Felix Oghină 9dc036d2b9 add gradle tasks for bundling js and assets in template
Summary: This adds gradle tasks that call `react-native bundle` with the correct args to bundle dev/release JS and assets. The dev task is disabled by default, as in dev mode people only use reload JS in most cases.

Submitting this as a pull request to have community visibility, although we have this code internally as well now and this will require an import.

* generate a project with `react-native init`, add some assets, run `./gradlew assembleRelease`, sign & zipalign generated APK, run it -> works
* enable dev bundling task, run `./gradlew installDebug` (not `react-native run-android` so as to not start the packager) -> works

Reviewed By: svcscm

Differential Revision: D2555071

Pulled By: foghina

fb-gh-sync-id: c3d9fcd4c77862e6a4db4e4d8d8cc39ee9dff3ab
2015-10-19 06:33:22 -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
Martin Bigio c0b5e6ed67 [react-native-cli] Move `new-library` command to `private-cli` 2015-10-16 11:20:29 -04:00
Pieter De Baets 74002b784b Fixes broken link to running on device
Summary: Closes https://github.com/facebook/react-native/pull/2420

@​public

Reviewed By: @majak

Differential Revision: D2549685

fb-gh-sync-id: 8ce3c9aa242cd65e8efc2bdd0065f9e20de8240d
2015-10-16 03:41:21 -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 a21e226b68 Remove `install` command
Summary: @​public

The implementation wasn't working. Lets remove this for now and revisit if we trully want to support this.

Reviewed By: @frantic

Differential Revision: D2536442

fb-gh-sync-id: 4aca2d1d2584cd15ac855d69e6e9a5a08abf778e
2015-10-13 12:08:22 -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 144f8598c2 Introduce configuration template
Summary: @​public

We're rolling out a replacement for `local-cli`. As part of the process we moved many hardcoded values into a JS based configuration file.

Reviewed By: @vjeux

Differential Revision: D2533111

fb-gh-sync-id: 7250bddee9989b089ded409104e098ef15d79498
2015-10-13 06:44:14 -07:00
Felix Oghină aa63636512 [cli] suppress yeoman create output in init 2015-10-12 16:10:18 +01:00
Martin Konicek a7b23df510 [Android] Add default Proguard config 2015-10-09 17:13:46 +01:00
Martin Konicek c740edaf03 Add a comment to CLI's init 2015-10-08 17:49:05 +01:00
Nick Simmons 8d3bbdf8e6 [cli] make init backwards-compatible for real 2015-10-07 17:39:22 -04:00
Ben Vinegar a16d0e46d8 Add --write-sourcemap option to 'bundle' cli command (fixes GH-3202) 2015-10-02 16:01:18 -07:00
Felix Oghină 046d8d2dee [cli] make init backwards-compatible 2015-10-02 14:44:20 +01:00
Atticus White 56abd6ab41 add android .gradle and build directories to sample app gitignore 2015-10-01 15:09:44 -04:00
Martin Konicek 31a0c95f69 [cli] Formatting 2015-10-01 15:33:45 +01:00
Martin Konicek a5463c4c10 [cli] Fix 'react-native start' on Windows
Based on https://github.com/facebook/react-native/pull/2989
Thanks @BerndWessels!
2015-10-01 15:28:05 +01:00
Felix Oghină 7f9cf97767 Merge pull request #2713 from jmhdez/fix-appName-on-init
[cli] pass arguments from cli instead of using process.argv in init
2015-10-01 12:06:24 +01:00
jmhdez 575e9b7b9a Respect projectName on template creation 2015-10-01 12:39:35 +02:00
Felix Oghină 3e7af6e1a4 [SampleApp] adding unsynced changes from PR #3025 2015-09-30 15:15:30 +01:00
Felix Oghina f6ec854e23 [cli] spawn xterm on linux to run the packager
Also use ANDROID_HOME env var when running adb.
2015-09-28 20:14:07 +01:00
Felix Oghină 5cd64a658d [cli] merge yeoman tests into one file to avoid concurrenct issues with jest 2015-09-24 17:02:43 +01:00
Felix Oghină 2dcb06949a [cli] use different names in generator tests 2015-09-24 13:54:01 +01:00
Jan Kassens c6a9d0e69f Update cacheVersion in bundle.js
As requested by @vjeux, this moves the change to this file to a separate PR.

For more info see #2905.
2015-09-23 15:24:54 -07:00
Aaron Chiu 2566ed8089 merge the root .flowconfig and local-cli/generator/templates/_flowconfig
Test Plan: flow check && scripts/e2e-tests.sh
2015-09-23 21:47:43 +01:00
Pieter De Baets 64eb8741ee Bump flow version 2015-09-18 19:28:38 -07:00
DengYun 9e60d5788c Merge branch 'master' of github.com:facebook/react-native into master-pr-6 2015-09-18 01:02:56 +08:00
DengYun 302c89f912 let 'react-native bundle' support platform option.
react-native bundle --platform android --minify
2015-09-18 00:58:50 +08:00
Kyle Corbitt 88add08c2e handle back button press in JS 2015-09-17 12:09:19 +01:00
Christopher Chedeau 36a8358ae7 Fix more tests
Summary: beeper node modules has a `return` statement outside of a function which doesn't parse. To fix it, we mock it. Also, setupEnvPolyfills is no longer being used.
Closes https://github.com/facebook/react-native/pull/2770

Reviewed By: @​svcscm

Differential Revision: D2448882

Pulled By: @vjeux
2015-09-16 13:05:30 -07:00
Felix Oghină f775bb0e05 [cli] update appcompat and gradle tools versions in the template 2015-09-16 16:30:31 +01:00
Christopher Chedeau 3f86d42b81 Merge pull request #2725 from javache/fix-flow-config
Update generator's flow config
2015-09-15 21:08:55 -07:00
Pieter De Baets 81c81501d5 Update generator's flow config 2015-09-15 11:20:24 -07:00
Pieter De Baets e7d833f2d9 Disable code stripping for DEBUG builds 2015-09-15 09:44:15 -07:00
Martin Konicek 42eb5464fd Release React Native for Android
This is an early release and there are several things that are known
not to work if you're porting your iOS app to Android.

See the Known Issues guide on the website.

We will work with the community to reach platform parity with iOS.
2015-09-14 18:13:39 +01:00
Christopher Chedeau e2ffac28e4 A deep dependency of yeoman just spams the console.log with giant json. This diff silences console.log around the require to kill them 2015-09-10 09:48:15 -07:00
Pieter De Baets bc69787576 Use new packager URL in e2e test 2015-09-10 14:41:16 +01:00
Rishab U Hegde 326768a949 Changing Linked Libraries URI to point to the right page 2015-08-26 18:47:03 -07:00
Martin Konicek 19f922aa80 [cli] Fix iOS app template 2015-08-25 19:25:17 +01:00
Felix Oghină 3b7bffa2a1 [e2e] fix e2e tests
* use new _flowconfig in generator template
* increase sinopia max_body_size
* remove breaking `cd` command from e2e-test.sh
2015-08-18 11:51:03 +01:00
Felix Oghină f83675d191 [cli] convert project generation to use yeoman 2015-08-12 12:04:27 +01:00
Isken Huang 6357931b61 add cli bundle url params 2015-07-14 10:40:39 +08:00
Spencer Ahrens 233f80d6c2 Fix tests
e2e flowconfig needed update, plus tweaks
2015-07-09 14:12:56 +02:00
Christopher Chedeau a6b6f97ba1 Merge pull request #1428 from JohnyDays/master
[CLI][Bundle][Packager] Implement --root --assetRoot and --out for consistency with packager and more flexibility
2015-06-19 11:56:02 +01:00
John Days a877c6bc68 Fix syntax error (missing ')') 2015-06-12 14:03:28 +01:00
John Days fcc4e4f8de [Bundler] Support multiple asset roots, for consistency with the packager 2015-06-12 13:06:31 +01:00
Tadeu Zagallo 7c49d293f1 Merge pull request #727 from TomMcHugh/master
[CLI] Adds Testing to CLI
2015-06-11 22:23:47 +01:00
John Days 34546e3bc8 Spaces before and after if conditions 2015-06-02 23:32:49 +01:00
John Days 169af1fb58 Add similar options from packager.sh to bundle.js, so we can develop and package with the same functionality 2015-05-27 19:02:26 +01:00
Joe Stanton 857c30b502 Stylistic cleanup 2015-05-15 17:08:21 +01:00
Joe Stanton 396439bf86 Added react-native new-library command 2015-05-15 09:17:27 +01:00
Joe Stanton 04832e5aa4 Fixed stylistic issues 2015-05-14 20:19:29 +01:00
Joe Stanton 29325d7cb3 Move init into local-cli 2015-05-14 18:08:56 +01:00
Joe Stanton 9caee3248b Linked with new local-cli, refactored 2015-05-14 16:11:05 +01:00
Alex Kotliarskyi 4933034334 Warn if `init` is called from existing project 2015-05-04 12:19:48 -07:00
Arthur Lee c13646fce1 Added bundle command using ReactPackager
Added bundle script
Pipe http response straight to file
Used ReactPackager directly, minor fixes
Added error handling to fs.writeFile
Changed .then to .done
2015-04-20 20:01:03 -04:00
Christopher Chedeau 0a5967dbfe Warn when installing globally react-native instead of react-native-cli
This adds a react-native binary that just output some instructions.
2015-04-08 11:15:56 -07:00
Thomas Mchugh 800502f2a0 Updates tests to work with new install output 2015-04-08 07:12:12 -05:00
Vinnie Garcia 2740e08ef7 Fix packager script breakage when running `npm start` 2015-04-08 01:21:30 -07:00
Christopher Chedeau d91d28a2a6 Unbreak npm publish
See https://github.com/facebook/react-native/pull/706#issuecomment-90799052
2015-04-07 21:30:46 -07:00
Thomas Mchugh 2efce394f5 Merge remote-tracking branch 'upstream/master' 2015-04-07 15:18:07 -05:00
Thomas Mchugh 10ca07840c added tests to cli 2015-04-07 15:16:33 -05:00
Alex Kotliarskyi 1dba7e0a5a Allow running local cli from terminal 2015-04-07 12:33:41 -07:00
Thomas Mchugh 6bc78b1d66 created install command and moved cli to local-cli directory 2015-04-06 12:58:03 -05:00