Uh oh!
There was an error while loading. Please reload this page.
docs: refresh quickstart and README for current ng add and deploy paths - #3736
docs: refresh quickstart and README for current ng add and deploy paths#3736armando-navarro wants to merge 1 commit into
Conversation
The quickstart described the pre-v7 ng add (environment files and AngularFireModule) and told users to run ng deploy, which no longer works on a fresh project. Correct step 2 to what ng add writes today (provideFirebaseApp in the app config, no environment files), fix the scaffold file and class names to app.ts and class App, type the Firestore binding with an Item interface, and split step 6 into the client-rendered path (Firebase Hosting) and the server-rendered path (App Hosting). Add a Before you begin section covering the @next requirement on the newest Angular major, the Firebase CLI, and the harmless CLI prompts. README: drop the obsolete single-command deploy bullet, remove the developer-preview disclaimer, fix the appConfig example (brace and missing imports), alphabetize the product-integrations table, and make the Stackblitz note template-agnostic.
tyler-reitz
left a comment
There was a problem hiding this comment.
Thanks for cleaning this up. I checked the claims against the schematics source and they hold:
src/schematics/setup/index.tsusesaddRootProviderto writeprovideFirebaseApp(() => initializeApp({...}))with the SDK config inlined, and creates no environment files, so the step 2 rewrite is accurate.- There is no deploy target wiring left in the setup schematic, so
ng deployreally does have nothing to run on a fresh project. Dropping it is the right call. - The README table is still well formed after the reorder (rows stay paired) and is correctly alphabetized.
docs/app-hosting.mdexists, so the new link resolves.
Three things before I approve:
docs/deploy/getting-started.mdnow contradicts this PR. It still saysng addwill "update your workspace file (angular.json) by inserting thedeploybuilder" and walks the reader throughng deploy, which is exactly what this PR removes as broken. Nothing in the repo links to it, but it is still findable via search and would send a user right back into the dead end. Could you delete it here, or add a note at the top pointing at the new step 6?The
@angular/fire:deploybuilder still ships insrc/schematics/builders.json. This PR removes every mention of it rather than saying it is still available but now needs the target wired manually. That reads like a product decision more than a docs one, so I want to check it is intentional. If we are keeping the builder, a sentence in step 6 acknowledging it would avoid the impression it was removed."Before you begin" should mention the firebase-tools minimum version.
src/schematics/firebaseTools.tsrequires 14.0.0 and hard fails with "please upgrade and run again" on anything older. Since that section already suggests installing the CLI ahead of time, someone with a stale global install hits precisely the dead end the section exists to prevent. Suggestnpm install -g firebase-tools@latestplus a note about the 14+ requirement.
Nit, non blocking: the step 3 snippet declares imports: [AsyncPipe] but does not use it. It is preexisting and step 4 does use it, so fine to leave as is.
tyler-reitz
left a comment
There was a problem hiding this comment.
Approving. Everything here is strictly more accurate than what is on main today, and it is docs only, so no reason to hold it.
To be clear about my earlier review: all three points are non-blocking and fine as follow-ups. Point 2 (the @angular/fire:deploy builder is still registered in src/schematics/builders.json even though this PR drops every mention of it) is a question rather than a change request. If dropping it is intentional deprecation, no action needed here.
Checklist
yarn install,yarn testrun successfully?: not applicable, no code changedDescription
Refreshes the Quickstart (
docs/install-and-setup.md) and the README so they match how a current Angular app is created and howng add @angular/firebehaves today.ng addactually does (writesprovideFirebaseApp(...)into the app configuration with the config inlined, no environment files).app.tsand classApp,templateUrl/styleUrl), and type the Firestore binding with anIteminterface.ng deploystep with guidance for both paths: Firebase Hosting for client-rendered apps, and Firebase App Hosting for server-rendered apps.@nextrequirement on the newest Angular major, the Firebase CLI, and the harmless setup prompts.Documentation only, no source or API changes.
Fixes#3735
Refs #3667