Commit 3523d7f
feat: ask to use recommended template (#564)
This is an effort to implement a recommended template. See the [Golden
Template
RFC](react-native-community/discussions-and-proposals#721)
for context.
This adds a new parameter called `--with-recommended-options` and the
corresponding question to the CLI.
Here's how the CLI prompt looks like:

This also adds the text `(Recommended)` at the end of the recommended
options (View + Module with backward compats and Kotlin + Obj-c at the
moment).
1. Run `create-react-native-library` and answer the mail address, git
repo, etc. questions.
2. Make sure the CLI asks `Do you want to customize the library type and
languages?`.
3. Select `Use recommended defaults`.
4. Wait until the library is generated and make sure the library is a
view + module, kotlin + objective-c library.
1. Run `create-react-native-library` and answer the mail address, git
repo, etc. questions.
2. Make sure the CLI asks `Do you want to customize the library type and
languages?`.
3. Select `Customize`.
4. Make sure the `Fabric view and Turbo module with backward compat`
option has the `(Recommended)` text.
1. Run `create-react-native-library` with `--with-recommended-options`
parameter.
2. Make sure the library doesn't ask you about library or type
selection.
3. Make sure the generated library uses the golden template.
1. Run `create-react-native-library` with `--with-recommended-options`
and `--type module-view-new`.
2. Make sure it emits an error.
---------
Co-authored-by: Satyajit Sahoo <[email protected]>1 parent b0ada7a commit 3523d7f
1 file changed
+64
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
| 121 | + | |
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
| |||
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
| 148 | + | |
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
| |||
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
155 | | - | |
| 157 | + | |
156 | 158 | | |
157 | 159 | | |
158 | 160 | | |
| |||
241 | 243 | | |
242 | 244 | | |
243 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
244 | 256 | | |
245 | 257 | | |
246 | 258 | | |
| |||
287 | 299 | | |
288 | 300 | | |
289 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
290 | 306 | | |
291 | 307 | | |
292 | 308 | | |
| |||
455 | 471 | | |
456 | 472 | | |
457 | 473 | | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
458 | 490 | | |
459 | 491 | | |
460 | 492 | | |
461 | 493 | | |
462 | | - | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
463 | 510 | | |
464 | 511 | | |
465 | 512 | | |
466 | 513 | | |
467 | 514 | | |
468 | 515 | | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
469 | 522 | | |
470 | 523 | | |
471 | 524 | | |
472 | 525 | | |
473 | 526 | | |
474 | 527 | | |
475 | | - | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
476 | 536 | | |
477 | 537 | | |
478 | 538 | | |
| |||
0 commit comments