diff --git a/.changeset/blue-rocks-install.md b/.changeset/blue-rocks-install.md new file mode 100644 index 0000000..2f30cf6 --- /dev/null +++ b/.changeset/blue-rocks-install.md @@ -0,0 +1,5 @@ +--- +"create-eigen-game": patch +--- + +The `firebase` CLI is now suggested as `curl -sL https://firebase.tools | bash` rather than `npm install -g firebase-tools`, both in the missing-tooling report and in the scaffolded project's README. That installer is Google's own, it picks a standalone binary or npm to suit the machine, and it is the one the Firebase documentation leads with. The npm install still works; it just needs a global prefix the reader may not have write access to. diff --git a/packages/create-eigen-game/src/index.ts b/packages/create-eigen-game/src/index.ts index d00cb41..72cc4f6 100644 --- a/packages/create-eigen-game/src/index.ts +++ b/packages/create-eigen-game/src/index.ts @@ -588,7 +588,11 @@ export function firebaseReadiness(probe: Probe = probeCommand): FirebaseReadines } else { // Nothing to say about the sign-in: the CLI that would answer is the one // that is missing, and `firebase login` is what installing leads to anyway. - problems.push({ reason: "the `firebase` CLI is not installed", fix: "npm install -g firebase-tools" }); + // Google's own installer, which picks a standalone binary or npm to suit + // the machine. `npm install -g firebase-tools` also works and is what this + // used to print, but it needs a global npm prefix the reader may not have + // write access to, and it is not the install the Firebase docs lead with. + problems.push({ reason: "the `firebase` CLI is not installed", fix: "curl -sL https://firebase.tools | bash" }); } if (!probe("flutterfire", ["--version"]).ok) { diff --git a/packages/create-eigen-game/templates/project/README.md b/packages/create-eigen-game/templates/project/README.md index 74a5a55..8904827 100644 --- a/packages/create-eigen-game/templates/project/README.md +++ b/packages/create-eigen-game/templates/project/README.md @@ -96,12 +96,16 @@ It drives two CLIs, which are separate global installs and neither of which comes with Flutter or Node: ```sh -npm install -g firebase-tools # the `firebase` CLI +curl -sL https://firebase.tools | bash # the `firebase` CLI dart pub global activate flutterfire_cli # the `flutterfire` CLI export PATH="$PATH":"$HOME/.pub-cache/bin" # `activate` does not do this firebase login # both CLIs share this ``` +The first line is Google's own installer; [the Firebase CLI +reference](https://firebase.google.com/docs/cli) has the other ways, including +Windows. + A run with no project chosen yet asks which to use, and can create one. Name it up front to skip the prompts, which is also how CI runs this: diff --git a/packages/create-eigen-game/test/scaffold.spec.ts b/packages/create-eigen-game/test/scaffold.spec.ts index 38e2b6c..92f3073 100644 --- a/packages/create-eigen-game/test/scaffold.spec.ts +++ b/packages/create-eigen-game/test/scaffold.spec.ts @@ -420,7 +420,7 @@ describe("firebaseReadiness", () => { // Asked here rather than left to `configure_firebase`, which runs at the // far end of two minutes of Flutter and pub. expect(firebaseReadiness(machine("flutterfire"))).toEqual({ ready: false, problems: [{ reason: "the `flutterfire` CLI is not installed", fix: "dart pub global activate flutterfire_cli" }] }); - expect(firebaseReadiness(machine("firebase"))).toEqual({ ready: false, problems: [{ reason: "the `firebase` CLI is not installed", fix: "npm install -g firebase-tools" }] }); + expect(firebaseReadiness(machine("firebase"))).toEqual({ ready: false, problems: [{ reason: "the `firebase` CLI is not installed", fix: "curl -sL https://firebase.tools | bash" }] }); }); it("catches a machine that has the tools but is signed out", () => {