Commit Graph

19 Commits

Author SHA1 Message Date
Eli White 36fcbaa56d Prettier the rest of ReactNative
Reviewed By: yungsters

Differential Revision: D7974340

fbshipit-source-id: 5fe457a8a9be4bd360fc3af9acb5c1136b2be0d7
2018-05-11 13:52:30 -07:00
David Aurelio f80000b9e7 Move `buildRegExps` from `react-native` to `metro-babel-register`
Summary: Moves the `buildRegExps` function from `react-native` to `metro-babel-register`. This way, it is easier to reuse, and we can remove FB-specific logic from React Native.

Reviewed By: jeanlauliac, mjesun

Differential Revision: D7727483

fbshipit-source-id: 0f7773ff044033c465f0712c523a0aef61bf8444
2018-04-23 13:49:58 -07:00
David Aurelio 2690ba5e59 Move worker protocol and babelRegisterOnly into their own packages
Summary: Moves the implementation of Buck’s worker protocol into its own package and babelRegisterOnly for better reusability.

Reviewed By: rafeca

Differential Revision: D7666896

fbshipit-source-id: ae297494ced3b8dd1f9d90983a640643d6ce7896
2018-04-23 04:00:00 -07:00
Peter van der Zee 8642356367 Drop workspace from metro lookup
Summary: Fix the path lookup for metro root.

Reviewed By: mjesun

Differential Revision: D7685280

fbshipit-source-id: 8d506bbf9c5af297d4050d2fa73475fd280bb186
2018-04-19 09:16:48 -07:00
Peter van der Zee af661e4a6f Add metro to paths to be babel-transformed
Reviewed By: fkgozali

Differential Revision: D7620341

fbshipit-source-id: fc801c938628f5b6b118b8250d5c63268e19359e
2018-04-13 14:15:20 -07:00
Sophie Alpert 1490ab12ef Update license headers for MIT license
Summary:
Includes React Native and its dependencies Fresco, Metro, and Yoga. Excludes samples/examples/docs.

find: ^(?:( *)|( *(?:[\*~#]|::))( )? *)?Copyright (?:\(c\) )?(\d{4})\b.+Facebook[\s\S]+?BSD[\s\S]+?(?:this source tree|the same directory)\.$
replace: $1$2$3Copyright (c) $4-present, Facebook, Inc.\n$2\n$1$2$3This source code is licensed under the MIT license found in the\n$1$2$3LICENSE file in the root directory of this source tree.

Reviewed By: TheSavior, yungsters

Differential Revision: D7007050

fbshipit-source-id: 37dd6bf0ffec0923bfc99c260bb330683f35553e
2018-02-16 18:31:53 -08:00
Christoph Nakazawa 654fed46f4 Rename metro-bundler to metro
Reviewed By: davidaurelio

Differential Revision: D6413420

fbshipit-source-id: f13184b8157de2c3aeaa7f2647becc175f62cdbb
2017-11-29 03:35:29 -08:00
Jaych Su 9e71b6065f Make prospective syntax compatible
Summary:
Can't run `RNTester` app and got the error below:

![image](https://user-images.githubusercontent.com/6890034/29361000-1ae6cfce-82b8-11e7-9522-b827de2712f7.png)

Make prospective syntax(trailing commas in function parameter lists and calls, supported in ES8) compatible.

If correct, the `RNTester` can be started.
Closes https://github.com/facebook/react-native/pull/15510

Differential Revision: D5644673

Pulled By: TheSavior

fbshipit-source-id: df34638f37b81f04cea5cf7a25fc7405d4321ea6
2017-08-16 16:42:16 -07:00
David Aurelio 475cf1ad29 Allow to pass regular expressions to `buildRegExps`
Summary: Allows to use `setupBabel.buildRegExps` with regular expressions, not only with strings.

Reviewed By: mjesun

Differential Revision: D5614738

fbshipit-source-id: ccad4d49f8d2006a714833989b3c6be2ce7071ab
2017-08-14 08:33:16 -07:00
James Ide 6e13adbf56 Remove remnants of the packager
Summary:
There were still some references to "packager/" that are no longer used since the `packager` directory has been deleted after moving to Metro. Cleaned up the ones that were doing nothing and updated the references that are still meaningful.
Closes https://github.com/facebook/react-native/pull/14881

Reviewed By: cpojer

Differential Revision: D5380731

Pulled By: javache

fbshipit-source-id: 1355268f48db47343d0d38fae2598b64c8c01475
2017-07-07 03:06:21 -07:00
David Aurelio 1faf40b02a Upgrade metro-bundler to v0.9.0
Summary: Upgrade metro-bundler to v0.9.0. This version has no functional change. The only change is that the structure of the npm package reflects the structure of the source code.

Reviewed By: bestander

Differential Revision: D5315651

fbshipit-source-id: 3a69337106d4ccf708823c80d304941973360e8e
2017-06-24 17:15:55 -07:00
Jean Lauliac 328d8ddb47 metro-bundler: make internal tool to use the new source of thruth for packager/metro-bundler
Reviewed By: davidaurelio

Differential Revision: D5182904

fbshipit-source-id: df5de3a9eb85560a09789d0a94eccb5c48ecba7b
2017-06-06 05:15:51 -07:00
Christoph Pojer 57bb955ba1 Move remaining Metro Bundler files around.
Reviewed By: jeanlauliac

Differential Revision: D5154653

fbshipit-source-id: 482bf9829263d5d8f3d0b951ee58e2020236cc2c
2017-05-31 11:17:41 -07:00
Christoph Pojer 17e0478cf4 Remove setupBabel call from main entry point
Summary:
* Internally, we already set up babel before calling into metro-bundler.
* Externally, I moved the setup calls to outside the packager/ folder.

If somebody has a custom integration with RN, they would need to setup babel themselves up until we make the open source split. By the time this is released in open source, an npm version of metro-bundler will be available for use.

Next step: also do this for the worker and remove setupBabel from the metro repo.

Reviewed By: davidaurelio

Differential Revision: D5121429

fbshipit-source-id: e77c6ccc23bef1d13fd74c4727be2d7e09d2d0ca
2017-05-24 11:45:46 -07:00
Christoph Pojer a2c84d14ce Remove `react-packager` indirection.
Summary:
This moves the `src` directory one level up and removes the `react-packager` folder. Personally, I always disliked this indirection. I'm reorganizing some things in RNP, so this seems to make sense.

Not sure if I forgot to update any paths. Can anyone advice if there are more places that need change?

Reviewed By: jeanlauliac

Differential Revision: D4487867

fbshipit-source-id: d63f9c79d6238300df9632d2e6a4e6a4196d5ccb
2017-02-02 05:44:15 -08:00
David Aurelio 9a4e4e8ee8 Fix packager breakages on node4
Summary:
This fixes issues that only surface when running with node4 / npm2.
Closes https://github.com/facebook/react-native/pull/11888

Differential Revision: D4415021

Pulled By: bestander

fbshipit-source-id: 8672cd892c9dae41cc7b5b7b3227eb24dd780d22
2017-01-13 09:28:41 -08:00
Janic Duplessis 6b1bc4ad74 Fix babel only regexp on windows
Summary:
cli / packager was broken on Windows after 28f1c67ced.

Babel `only` regexp option requires paths to use forward slashes only but `__dirname` will use backslashes on windows. This simply adds a replace to normalize to forward slashes.

cc jeanlauliac cpojer
Closes https://github.com/facebook/react-native/pull/11850

Reviewed By: cpojer

Differential Revision: D4409143

Pulled By: jeanlauliac

fbshipit-source-id: a705236630959f762e53100299ab073ec9a29ee1
2017-01-12 12:43:39 -08:00
Jean Lauliac 207776107d packager: enable @flow in react-packager/index.js
Reviewed By: cpojer

Differential Revision: D4377411

fbshipit-source-id: 300d239d8e2818f0488549feafc98fd3451e452d
2017-01-06 06:13:54 -08:00
Jean Lauliac 28f1c67ced packager: centralize babelRegisterOnly callsites
Reviewed By: davidaurelio

Differential Revision: D4380987

fbshipit-source-id: db34e56b2025fb072798ef2cc3e52f3d1cb7c33c
2017-01-06 06:13:54 -08:00