Skip to content

Commit 634cdc6

Browse files
committed
chore: hide testing app behind an env var
1 parent eb4850b commit 634cdc6

File tree

1 file changed

+21
-19
lines changed
  • packages/create-react-native-library/src

1 file changed

+21
-19
lines changed

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

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -144,25 +144,27 @@ const LANGUAGE_CHOICES: {
144144
},
145145
];
146146

147-
const EXAMPLE_CHOICES = [
148-
{
149-
title: 'Vanilla',
150-
value: 'vanilla',
151-
description: "provides access to app's native code",
152-
},
153-
// The test app is disabled for now until proper
154-
// Codegen spec shipping is implemented
155-
// {
156-
// title: 'Test app',
157-
// value: 'test-app',
158-
// description: "app's native code is abstracted away",
159-
// },
160-
{
161-
title: 'Expo',
162-
value: 'expo',
163-
description: 'managed expo project with web support',
164-
},
165-
] as const;
147+
const EXAMPLE_CHOICES = (
148+
[
149+
{
150+
title: 'Vanilla',
151+
value: 'vanilla',
152+
description: "provides access to app's native code",
153+
},
154+
// The test app is disabled for now until proper
155+
// Codegen spec shipping is implemented
156+
process.env.CRNL_ENABLE_TEST_APP && {
157+
title: 'Test app',
158+
value: 'test-app',
159+
description: "app's native code is abstracted away",
160+
},
161+
{
162+
title: 'Expo',
163+
value: 'expo',
164+
description: 'managed expo project with web support',
165+
},
166+
] as const
167+
).filter(Boolean);
166168

167169
const NEWARCH_DESCRIPTION = 'requires new arch (experimental)';
168170
const BACKCOMPAT_DESCRIPTION = 'supports new arch (experimental)';

0 commit comments

Comments
 (0)