Skip to content

Commit

Permalink
feat: detach doctor command (react-native-community#1183)
Browse files Browse the repository at this point in the history
* feat: detach doctor command

* update snapshot

* bring back doctor to project commands set as well
  • Loading branch information
thymikee authored Jun 3, 2020
1 parent f5fbaf9 commit 999059a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion __e2e__/__snapshots__/default.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ Options:
-h, --help output usage information
Commands:
init [options] <projectName> Initialize a new React Native project named <projectName> in a directory of the same name."
init [options] <projectName> Initialize a new React Native project named <projectName> in a directory of the same name.
doctor [options] [EXPERIMENTAL] Diagnose and fix common Node.js, iOS, Android & React Native issues."
`;
1 change: 1 addition & 0 deletions packages/cli/src/commands/doctor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import doctor from './doctor';

export default {
func: doctor,
detached: true,
name: 'doctor',
description:
'[EXPERIMENTAL] Diagnose and fix common Node.js, iOS, Android & React Native issues.',
Expand Down
5 changes: 1 addition & 4 deletions packages/cli/src/commands/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import {Command, DetachedCommand} from '@react-native-community/cli-types';

// @ts-ignore - JS file
import start from './start/start';
import bundle from './bundle/bundle';
import ramBundle from './bundle/ramBundle';
Expand All @@ -12,7 +10,6 @@ import upgrade from './upgrade/upgrade';
import info from './info/info';
import config from './config/config';
import init from './init';
// @ts-ignore - JS file
import doctor from './doctor';

export const projectCommands = [
Expand All @@ -29,4 +26,4 @@ export const projectCommands = [
doctor,
] as Command[];

export const detachedCommands = [init] as DetachedCommand[];
export const detachedCommands = [init, doctor] as DetachedCommand[];

0 comments on commit 999059a

Please sign in to comment.