To utilize the existing Firebase "alias" title in an NPM script, you can use the following command:
firebase use <alias> --add
This command will add the alias to the Firebase configuration and set it as the active project. Once the alias is added, you can reference it in your NPM script using the $FIREBASE_PROJECT_ID
environment variable.
For example, if your alias is called "production", you can use the following command in your NPM script:
"deploy": "firebase deploy --project $FIREBASE_PROJECT_ID"
This will deploy your Firebase project using the "production" alias as the active project.
Asked: 2023-05-08 14:29:04 +0000
Seen: 11 times
Last updated: May 08 '23