Commit Graph

35 Commits

Author SHA1 Message Date
Forbes Lindesay
fccea2f365 Replace bluebird with promise 2015-06-22 08:44:03 -08:00
Bill Fisher
5aee4cec98 [ReactNative][easy] fix server 500 response typo
Summary:
@public
corrected small typo in the 500 response from the packager server

Test Plan: add throw to promise function prior to error handler, run packager, cache a bundle with bundle extension URI, open /debug/packages, see clean 500 error
2015-06-20 16:43:18 -08:00
Amjad Masad
0fec355076 [react-packager] Cache based on options, not url
Summary:
@public

We cached based on url, which wasn't unique becuase some options would be defaulted. This was obvious when starting the server via fbrnios which tries to warmup the bundle.
And then when the device woke up it will send a request (that is identical in reality) but would miss the cache.

This changes the cache key into a JSON stringification of the options.

Test Plan:
* ./runJestTests.sh
* ./fbrnios.sh run
2015-06-19 15:14:31 -08:00
Amjad Masad
82a082a794 [react-packager] Introduce buildPackage API 2015-05-22 17:28:27 -08:00
Amjad Masad
9a76f224af [react-packager] Add first class support to popular image formats
Summary:
@public
1. Default to first class support of popular image formats
2. Add tests to make sure we support other than png

Test Plan:
1. ./runJestTests.sh
2. Add test.png and test.jpg images in the Playground app dir
3. require both images and render then in the playground app
4. they render
2015-05-20 15:28:29 -08:00
Nick Lockwood
6b2c88feec decode pathName when extracting from url 2015-05-13 13:24:36 -07:00
Amjad Masad
b4c82a4089 [react-packager] Additional data to asset modules 2015-04-22 10:59:37 -08:00
Amjad Masad
77d908b975 [react-packager] Allow json files as modules 2015-04-21 10:51:15 -08:00
Amjad Masad
2975f26e80 [react-packager] Add asset extensions to file watch glob in the project root 2015-04-17 09:03:41 -08:00
Tadeu Zagallo
1883ba535c [ReactNative] Send batched calls from objc to js every frame + add bridge profiling 2015-04-17 04:01:02 -08:00
Amjad Masad
fb7036eaac [react-packager] implement /assets endpoint to serve assets 2015-04-16 13:00:48 -08:00
Spencer Ahrens
a1ec752019 [ReactNative] Do flow check when running packager 2015-04-07 21:40:05 -08:00
Pilwon Huh
87599bfcd1 [react-packager] Switch from Q to Bluebird as promises library
Summary:
This PR improves performance of `react-packager` by switching the promises library from the [Q](https://github.com/kriskowal/q) to [Bluebird](https://github.com/petkaantonov/bluebird).

[Here is the test result](https://github.com/facebook/react-native/issues/361#issuecomment-87829808) showing a noticeable difference. (2x speed improvement)

Please refer to [this issue](https://github.com/facebook/react-native/issues/361) for more details.
Closes https://github.com/facebook/react-native/pull/516
Github Author: Pilwon Huh <pilwon@gmail.com>

Test Plan:
./runJestTests
start app and click around
2015-03-31 21:24:13 -08:00
Amjad Masad
a925082d2e [react-packager] Watch asset roots for changes to update dependency graph 2015-03-27 09:18:00 -08:00
Amjad Masad
39fe5ec266 [react-packager] Fix node v0.11.14 query parse bug 2015-03-26 14:33:33 -08:00
Amjad Masad
031adabd18 [react-packager] better error when main file not found 2015-03-26 10:38:50 -08:00
Amjad Masad
909e393f26 [react-packager] kill non-standard RAW_SOURCE_MAP 2015-03-24 17:17:02 -08:00
Amjad Masad
bc921916ed [react-packager] Fix regression with transform errors 2015-03-23 18:55:36 -08:00
Christopher Chedeau
f67a36733f [ReactNative] Expanded license on js packager files 2015-03-23 11:28:51 -08:00
Amjad Masad
a6b154332b [react-packager] Pick up package changes while running 2015-03-23 11:15:52 -08:00
Amjad Masad
ce6354604c [react-packager] Allow entry point extensions like .ios.js 2015-03-20 17:24:51 -08:00
Amjad Masad
115ad71831 [react-packager] Fix OOM 2015-03-19 11:50:27 -08:00
Amjad Masad
9249545047 [react-packager] Implement image loading i.e. ix('img') -> require('image!img'); 2015-03-13 16:10:58 -08:00
Amjad Masad
c99284bfdf [react-packager] onchange endpoint that informs of changes 2015-03-06 15:28:32 -08:00
Amjad Masad
b9207a3095 [react-packager] dev option needs to default to true for backwards compat 2015-03-06 14:45:23 -08:00
Amjad Masad
ab2537816f [react-packager] Add minify option as query param 2015-03-05 12:12:42 -08:00
Amjad Masad
78d03b89b7 [react-packager] Make dev a query param option 2015-03-04 21:24:08 -08:00
Amjad Masad
4f2c336ac3 [react-packager] Start converting options to query params 2015-03-04 19:06:51 -08:00
Amjad Masad
ab43dd9813 [react-packager] check-in node_modules and update tests 2015-03-03 02:02:51 -08:00
James Ide
e5d86aeb5b [react-packager] Add dev option to CLI | James Ide
Summary:
Exposes the dev option that is already there to the CLI so that you can turn off invariant checks, etc. I also made it omit the inlined source map when dev=false which made it a lot faster to run on a phone, both due to smaller download size and fewer bytes to copy from Obj-C to JS and evaluate.
Closes https://github.com/facebook/react-native/pull/112
Github Author: James Ide <ide@jameside.com>

Test Plan:
* ./runJestTests.sh
* test bundle creation with `bundle.sh`
* test `load_dependencies.js` script
* start the server and click around shell app
2015-03-02 21:11:07 -08:00
Amjad Masad
a9c8b13e6e [React Native][react-packager] Fix test runner and fialing tests 2015-02-28 14:55:00 -08:00
Amjad Masad
68fcfc3050 [react-packager] transformModulePath option is not actually required 2015-02-27 10:51:07 -08:00
Amjad Masad
96312af117 [react-packager] Fix lint errors 2015-02-25 20:29:42 -08:00
Amjad Masad
f426ec8d7d [react-packager] Cleanup option passing and validation 2015-02-24 15:17:40 -08:00
Spencer Ahrens
efae175a8e [react-packager][streamline oss] Move open sourced JS source to react-native-github 2015-02-19 21:25:11 -08:00