EddyVerbruggen/nativescript-plugin-firebase

Feature Request: Add/Override additional environments for Google services files

Open

#1,515 opened on 2019年12月9日

GitHub で見る
 (6 comments) (0 reactions) (0 assignees)TypeScript (429 forks)github user discovery
enhancementhelp wanted

Repository metrics

Stars
 (1,005 stars)
PR merge metrics
 (30d に merged PR はありません)

説明

Hi Eddy, I think it'd be handy to have a way to add additional Firebase environments, or override the defaults. Currently the plugin supports development and production environments, but other ones like staging or pre-production would be good too. I don't know if it's possible but a good place to control these might be in the firebase.nativescript.json file as an array of the the specified environments. These would correspond to the suffixes on the google-services.json and GoogleServices-Info.plist files.

Example

  • prod will be selected if you run with either the --release, --env.prod or --env.production flags
  • staging will be selected if you run with --env.staging (the environment string must match what is in the configuration array, filename and command-line arguments). If you combine --release with --env.staging. then staging would be selected and the app would be built as a release version.
  • dev will be selected if you do not run with any of the above flags
// in firebase.nativescript.json file
{
  ...
  "firebase_environments": [ "dev", "staging", "prod" ]
  ...
}

// above would map to:
// Android
//    google-services.json.dev
//    google-services.json.staging
//    google-services.json.prod

// iOS
//    GoogleServices-Info.plist.dev
//    GoogleServices-Info.plist.staging
//    GoogleServices-Info.plist.prod

コントリビューターガイド