mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-28 20:25:33 +08:00
Use new configuration in react-native public cli
Summary: Change the public react-native CLI to use the new configuration of Metro. Reviewed By: rafeca Differential Revision: D8801217 fbshipit-source-id: 112e4812b430ebee1ed41489f803b90c182ccdb4
This commit is contained in:
committed by
Facebook Github Bot
parent
f0daaf3568
commit
a32620dc3b
@@ -10,7 +10,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const config = require('./core');
|
||||
const {configPromise} = require('./core');
|
||||
|
||||
const assertRequiredOptions = require('./util/assertRequiredOptions');
|
||||
/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error
|
||||
@@ -137,7 +137,8 @@ const addCommand = (command: CommandT, cfg: RNConfig) => {
|
||||
cmd.option('--config [string]', 'Path to the CLI configuration file');
|
||||
};
|
||||
|
||||
function run() {
|
||||
async function run() {
|
||||
const config = await configPromise;
|
||||
const setupEnvScript = /^win/.test(process.platform)
|
||||
? 'setup_env.bat'
|
||||
: 'setup_env.sh';
|
||||
|
||||
Reference in New Issue
Block a user