Skip to content

Commit f04534b

Browse files
committed
refactor: unify example app types
1 parent 8fb378c commit f04534b

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

packages/create-react-native-library/src/exampleApp/generateExampleApp.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import path from 'path';
33
import https from 'https';
44
import { spawn } from '../utils/spawn';
55
import sortObjectKeys from '../utils/sortObjectKeys';
6-
7-
export type ExampleType = 'vanilla' | 'test-app' | 'expo' | 'none';
6+
import type { ExampleApp } from '../input';
87

98
const FILES_TO_DELETE = [
109
'__tests__',
@@ -50,7 +49,7 @@ export default async function generateExampleApp({
5049
bobVersion,
5150
reactNativeVersion = 'latest',
5251
}: {
53-
type: ExampleType;
52+
type: ExampleApp;
5453
dest: string;
5554
arch: 'new' | 'mixed' | 'legacy';
5655
project: {

packages/create-react-native-library/src/input.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import validateNpmPackage from 'validate-npm-package-name';
22
import githubUsername from 'github-username';
33
import type yargs from 'yargs';
44
import type { PromptObject } from './utils/prompts';
5-
import type { ExampleType } from './exampleApp/generateExampleApp';
65
import { spawn } from './utils/spawn';
76

87
export type ArgName =
@@ -202,7 +201,7 @@ export type Answers = {
202201
repoUrl: string;
203202
languages: ProjectLanguages;
204203
type?: ProjectType;
205-
example?: ExampleType;
204+
example?: ExampleApp;
206205
reactNativeVersion?: string;
207206
local?: boolean;
208207
};

0 commit comments

Comments
 (0)