Skip to content

Commit 25f9556

Browse files
fix: creating library with react-native-test-app example (#622)
<!-- Please provide enough information so that others can review your pull request. --> <!-- Keep pull requests small and focused on a single change. --> ### Summary Conditionally add codegen-releated stuff added recently to unblocks the command. ### Test plan 1. `create-react-native-library` 2. Choose test app as an example 3. `example/` apps should build.
1 parent eacd9ce commit 25f9556

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ async function create(_argv: yargs.Arguments<any>) {
790790
examplePackageJson.dependencies['react-native'];
791791
}
792792

793-
if (arch !== 'legacy') {
793+
if (arch !== 'legacy' && example === 'vanilla') {
794794
addCodegenBuildScript(folder, options.project.name);
795795
}
796796
}

packages/create-react-native-library/templates/common/$package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,12 @@
202202
},
203203
"android": {
204204
"javaPackageName": "com.<%- project.package %>"
205+
<% if (example === 'vanilla') { -%>
205206
},
206207
"includesGeneratedCode": true
208+
<% } else { -%>
209+
}
210+
<% } -%>
207211
<% } -%>
208212
}
209213
}

0 commit comments

Comments
 (0)