-
Notifications
You must be signed in to change notification settings - Fork 37
Updated for the Firebase issue. #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Updated for the Firebase issue. #41
Conversation
|
|
||
| const packages = await checkbox({ | ||
| let packages = await checkbox({ | ||
| message: "Select optional packages:", | ||
| choices: [ | ||
| { name: "Axios", value: "axios" }, | ||
| { name: "React Icons", value: "react-icons" }, | ||
| { name: "React Hook Form", value: "react-hook-form" }, | ||
| { name: "Yup", value: "yup" }, | ||
| { name: "Formik", value: "formik" }, | ||
| { name: "Moment.js", value: "moment" } | ||
| { name: "Moment.js", value: "moment" }, | ||
| { name: "Firebase (Firestore utils + env)", value: "firebase" } | ||
| ] | ||
| }); | ||
|
|
||
| // Fallback: some terminals or clients may not toggle checkboxes reliably. | ||
| // If Firebase wasn't picked above, ask a simple confirm so the user can't miss it. | ||
| if (!packages.includes('firebase')) { | ||
| try { | ||
| const firebaseConfirm = await confirm({ message: 'Would you like to add Firebase (Firestore utils + env)?', default: false }); | ||
| if (firebaseConfirm) { | ||
| packages = [...packages, 'firebase']; | ||
| } | ||
| } catch (e) { | ||
| // ignore confirm errors and continue | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a dedicated confirmation command for firebase, which ask,
do you want to setup firebase in this project?
If yes then then just simply add it in packages and rest is setup.
|
hey this is my first time contributing to open souce project, should i open a new pull request or is there way to implement here only. also according your last message , env and basic boiler plate code for firebase wont be needed right? |
You can follow the same way where |
Added [firebase.js] a new Firebase helper module implementing configuration and basic helper functions.
Applied integration changes to [index.js] and related code to use the new Firebase helper.