Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Remove eject #275

Merged
merged 3 commits into from
Mar 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.