Skip to content

Commit cb6eb03

Browse files
grabboufacebook-github-bot
authored andcommitted
Extract out CLI (#22337)
Summary: Continuation of #22174 with an exception that `local-cli` folder is left in React Native repository to keep Facebook internal and React Native calls still working. Separate strategy should be developed to remove all uses of `local-cli` in favor of dedicated utilities. Pull Request resolved: #22337 Reviewed By: TheSavior Differential Revision: D13172898 Pulled By: cpojer fbshipit-source-id: 0217867f9944648307475ebe629eb729da7bfaaf
1 parent 0ef1bc3 commit cb6eb03

File tree

5 files changed

+435
-31
lines changed

5 files changed

+435
-31
lines changed

local-cli/bundle/buildBundle.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* LICENSE file in the root directory of this source tree.
66
*
77
* @format
8-
* @flow
98
*/
109

1110
'use strict';

local-cli/cli.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,7 @@
77
* @format
88
*/
99

10-
'use strict';
11-
12-
// gracefulify() has to be called before anything else runs
13-
require('graceful-fs').gracefulify(require('fs'));
14-
15-
// This file must be able to run in node 0.12 without babel so we can show that
16-
// it is not supported. This is why the rest of the cli code is in `cliEntry.js`.
17-
require('./server/checkNodeVersion')();
18-
19-
require('../setupBabel')();
20-
21-
var cliEntry = require('./cliEntry');
10+
var cliEntry = require('react-native-local-cli');
2211

2312
if (require.main === module) {
2413
cliEntry.run();

local-cli/server/runServer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @flow
87
* @format
98
*/
109

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,6 @@
153153
"build-ios-e2e": "detox build -c ios.sim.release",
154154
"test-ios-e2e": "detox test -c ios.sim.release --cleanup"
155155
},
156-
"bin": {
157-
"react-native": "local-cli/wrong-react-native.js"
158-
},
159156
"peerDependencies": {
160157
"react": "16.6.1"
161158
},
@@ -204,6 +201,7 @@
204201
"prop-types": "^15.5.8",
205202
"react-clone-referenced-element": "^1.0.1",
206203
"react-devtools-core": "^3.4.2",
204+
"react-native-local-cli": "1.0.0-alpha.4",
207205
"regenerator-runtime": "^0.11.0",
208206
"rimraf": "^2.5.4",
209207
"semver": "^5.0.3",

0 commit comments

Comments
 (0)