🚇 The JavaScript bundler for React Native. https://facebook.github.io/metro
Go to file
Jean Lauliac 0ea19a62d7 packager: introducing async/await
Summary:
allow-large-files

By using async/await the code is (1) less nested, (2) more compact and (3) more robust (no exceptions running away, and much less risks of forgetting to call the callback/resolve, or mistakenly calling it twice). I now tend to think we could switch to it for all the callsites that are not in a perf-critical path.

I switched from 'request' to 'node-fetch' because 'request' has an annoying callback with 2 arguments. So it's simpler to use an interface that's (1) already returning a Promise and (2) that is becoming standard.

This changeset was a way for me to start experiment with introducing async/await in packager codebase, and it looks pretty good so far.

Reviewed By: cpojer

Differential Revision: D4559167

fbshipit-source-id: 89a328c5766c2ba890e9d0e67a81a38dac6cfc73
2017-02-15 13:51:41 -08:00
.github Initial repository structure. 2017-01-26 12:56:40 +00:00
flow-typed Initial repository structure. 2017-01-26 12:56:40 +00:00
packages/metro-bundler packager: introducing async/await 2017-02-15 13:51:41 -08:00
scripts Initial repository structure. 2017-01-26 12:56:40 +00:00
.babelrc Initial repository structure. 2017-01-26 12:56:40 +00:00
.eslintignore Initial repository structure. 2017-01-26 12:56:40 +00:00
.eslintrc Initial repository structure. 2017-01-26 12:56:40 +00:00
.flowconfig Initial repository structure. 2017-01-26 12:56:40 +00:00
.gitignore Initial repository structure. 2017-01-26 12:56:40 +00:00
.npmignore Initial repository structure. 2017-01-26 12:56:40 +00:00
.travis.yml Initial repository structure. 2017-01-26 12:56:40 +00:00
CHANGELOG.md Initial repository structure. 2017-01-26 12:56:40 +00:00
CONTRIBUTING.md Initial repository structure. 2017-01-26 12:56:40 +00:00
LICENSE Initial repository structure. 2017-01-26 12:56:40 +00:00
PATENTS Initial repository structure. 2017-01-26 12:56:40 +00:00
README.md Move 2017-01-26 13:31:04 +00:00
appveyor.yml Initial repository structure. 2017-01-26 12:56:40 +00:00
lerna.json Initial repository structure. 2017-01-26 12:56:40 +00:00
package.json Move 2017-01-26 13:31:04 +00:00
yarn.lock Initial repository structure. 2017-01-26 12:56:40 +00:00

README.md

metro-bundler Build Status Windows Build Status npm version

The JavaScript bundler for React Native