EddyVerbruggen/nativescript-plugin-firebase

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

Open

#1,515 建立於 2019年12月9日

在 GitHub 查看
 (6 留言) (0 反應) (0 負責人)TypeScript (429 fork)github user discovery
enhancementhelp wanted

倉庫指標

Star
 (1,005 star)
PR 合併指標
 (30 天內沒有已合併 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

貢獻者指南