Commit 30df719
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 09e7a3a commit 30df719
1 file changed
+64
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
| 122 | + | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| |||
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| 149 | + | |
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
| |||
153 | 155 | | |
154 | 156 | | |
155 | 157 | | |
156 | | - | |
| 158 | + | |
157 | 159 | | |
158 | 160 | | |
159 | 161 | | |
| |||
242 | 244 | | |
243 | 245 | | |
244 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
245 | 257 | | |
246 | 258 | | |
247 | 259 | | |
| |||
288 | 300 | | |
289 | 301 | | |
290 | 302 | | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
291 | 307 | | |
292 | 308 | | |
293 | 309 | | |
| |||
463 | 479 | | |
464 | 480 | | |
465 | 481 | | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
466 | 498 | | |
467 | 499 | | |
468 | 500 | | |
469 | 501 | | |
470 | | - | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
471 | 518 | | |
472 | 519 | | |
473 | 520 | | |
474 | 521 | | |
475 | 522 | | |
476 | 523 | | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
477 | 530 | | |
478 | 531 | | |
479 | 532 | | |
480 | 533 | | |
481 | 534 | | |
482 | 535 | | |
483 | | - | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
484 | 544 | | |
485 | 545 | | |
486 | 546 | | |
| |||
0 commit comments