invertase / flutterfire_cli

A CLI to help with using FlutterFire in your Flutter applications.
Apache License 2.0
170 stars 47 forks source link

request: Configurable firebase.json output directory ("--firebase-out=<PATH>") #277

Open kNoAPP opened 5 months ago

kNoAPP commented 5 months ago

Is there an existing feature request for this?

Command

flutterfire configure --yes --project=<FIREBASE_PROJECT_ID> --firebase-out=<PATH>

Description

As a developer, I want to be able to dictate where the firebase.json generated file is written to.

Reasoning

This feature is useful for compatibility with projects with abnormal file structures, multi-environments, or special CI/CD instructions.

Additional context and comments

The other generated outputs have path-supported flags:

flutterfire configure \ 
--yes \
--project=your-project-id \
--platforms=ios,macos,android,web \
**--android-out=android/app/src/release/google-services.json \**
--android-package-name=com.example.myapp.release \
--ios-build-config=Release \
**--ios-out=/ios/release/GoogleService-Info.plist \**
--ios-bundle-id=com.example.myApp.ios.release \
--macos-build-config=Release \
**--macos-out=/macos/release/GoogleService-Info.plist \**
--macos-bundle-id=com.example.myApp.macos.release \
--web-app-id=<1:XXX:web:XXX> \
**--out=lib/release/firebase_options.dart**

Supporting the firebase.json location would further future-proof the CLI.