Skip to content

Commit 5599ee6

Browse files
authored
fix: update ‘js’ value type to new value ‘library’ in create library script (#253)
### Summary The [email protected] has the wrong type value reference for javascript library, and prompt script force to choose a language for mobile. I'm not sure it fixes everything, but script now seems to work correctly for javascript library path. ``` $ npx [email protected] awesome-module ✔ What is the name of the npm package? … react-native-awesome-module ✔ What is the description for the package? … An awesome module ✔ What is the name of package author? … Marco Travaglini ✔ What is the email address for the package author? … [email protected] ✔ What is the URL for the package author? … https://gitlab.com/napcoder ✔ What is the URL for the repository? … https://gitlab.com/napcoder/react-native-awesome-module ✔ What type of library do you want to develop? › JavaScript library ? Which languages do you want to use? › - Use arrow-keys. Return to submit. ❯ Java & Objective-C Java & Swift Kotlin & Objective-C Kotlin & Swift C++ for both iOS & Android ``` ### Test plan ``` [napcoder@Ceres:~/projects/moduli/prove]$ ../../react-native-builder-bob/packages/create-react-native-library/bin/create-react-native-library awesome-module ✔ What is the name of the npm package? … react-native-awesome-module ✔ What is the description for the package? … An awesome module ✔ What is the name of package author? … Marco Travaglini ✔ What is the email address for the package author? … [email protected] ✔ What is the URL for the package author? … https://gitlab.com/napcoder ✔ What is the URL for the repository? … https://gitlab.com/napcoder/react-native-awesome-module ✔ What type of library do you want to develop? › JavaScript library ✔ What type of example app do you want to generate? › JavaScript only (with Expo and Web support) Project created successfully at authsdk! Get started with the project: $ yarn Run the example app on iOS: $ yarn example ios Run the example app on Android: $ yarn example android Run the example app on Web: $ yarn example web Good luck! ```
1 parent a079b2a commit 5599ee6

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ async function create(argv: yargs.Arguments<any>) {
258258
},
259259
'languages': {
260260
type: (_, values) =>
261-
values.type === 'js' ||
261+
values.type === 'library' ||
262262
values.type === 'module-turbo' ||
263263
values.type === 'module-mixed'
264264
? null
@@ -274,7 +274,7 @@ async function create(argv: yargs.Arguments<any>) {
274274
],
275275
},
276276
'example': {
277-
type: (_, values) => (values.type === 'js' ? 'select' : null),
277+
type: (_, values) => (values.type === 'library' ? 'select' : null),
278278
name: 'example',
279279
message: 'What type of example app do you want to generate?',
280280
choices: [

0 commit comments

Comments
 (0)