Skip to content

Commit ac95039

Browse files
fix: hide select example question when creating local library (#594)
<!-- Please provide enough information so that others can review your pull request. --> <!-- Keep pull requests small and focused on a single change. --> ### Summary A regression introduced in #572. CRNL shouldn't ask for example type in local library scenario. ### Test plan 1. Run `create-react-native-library` under a React Native project. 2. Example project shouldn't be included in the local library.
1 parent 5052841 commit ac95039

File tree

1 file changed

+6
-3
lines changed
  • packages/create-react-native-library/src

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,10 @@ async function create(_argv: yargs.Arguments<any>) {
471471
});
472472
},
473473
},
474-
{
474+
];
475+
476+
if (!local) {
477+
questions.push({
475478
type: 'select',
476479
name: 'example',
477480
message: 'What type of example app do you want to create?',
@@ -486,8 +489,8 @@ async function create(_argv: yargs.Arguments<any>) {
486489
return true;
487490
});
488491
},
489-
},
490-
];
492+
});
493+
}
491494

492495
const validate = (answers: Answers) => {
493496
for (const [key, value] of Object.entries(answers)) {

0 commit comments

Comments
 (0)