Skip to content

Commit

Permalink
Refactor: Remove eject (react-native-community#275)
Browse files Browse the repository at this point in the history
Summary:
---------

Since `create-react-native-app` is deprecated this functionality is no longer needed.
  • Loading branch information
Esemesek authored and dratwas committed Jul 12, 2019
1 parent b8c842f commit ac673ba
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 142 deletions.
3 changes: 0 additions & 3 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ CLI comes with a set of commands and flags you can pass to them.

- [`bundle`](#bundle)
- [`dependencies`](#dependencies)
- [`eject`](#eject)
- [`info`](#info)
- [`install`](#install)
- [`library`](#library)
Expand All @@ -29,8 +28,6 @@ _Note: This document is still under development and doesn't represent the full A

### `dependencies`

### `eject`

### `info`

### `install`
Expand Down
97 changes: 0 additions & 97 deletions packages/cli/src/commands/eject/eject.js

This file was deleted.

2 changes: 0 additions & 2 deletions packages/cli/src/commands/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import runAndroid from './runAndroid/runAndroid';
import library from './library/library';
import bundle from './bundle/bundle';
import ramBundle from './bundle/ramBundle';
import eject from './eject/eject';
import link from './link/link';
import unlink from './link/unlink';
import install from './install/install';
Expand All @@ -40,7 +39,6 @@ const loadLocalCommands: Array<LocalCommandT> = [
library,
bundle,
ramBundle,
eject,
link,
unlink,
install,
Expand Down
14 changes: 0 additions & 14 deletions packages/cli/src/commands/link/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import getProjectConfig from './getProjectConfig';
import linkDependency from './linkDependency';
import linkAssets from './linkAssets';
import linkAll from './linkAll';
import findReactNativeScripts from '../../tools/findReactNativeScripts';
import getPlatforms, {getPlatformName} from '../../tools/getPlatforms';

type FlagsType = {
Expand Down Expand Up @@ -59,19 +58,6 @@ function link([rawPackageName]: Array<string>, ctx: ContextT, opts: FlagsType) {
);
return Promise.reject(err);
}
const hasProjectConfig = Object.keys(platforms).reduce(
(acc, key) => acc || key in project,
false,
);
if (!hasProjectConfig && findReactNativeScripts()) {
throw new Error(
'`react-native link [package]` can not be used in Create React Native App projects. ' +
'If you need to include a library that relies on custom native code, ' +
'you might have to eject first. ' +
'See https://github.com/react-community/create-react-native-app/blob/master/EJECTING.md ' +
'for more information.',
);
}

if (rawPackageName === undefined) {
logger.debug(
Expand Down
26 changes: 0 additions & 26 deletions packages/cli/src/tools/findReactNativeScripts.js

This file was deleted.

0 comments on commit ac673ba

Please sign in to comment.