You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+46-4Lines changed: 46 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -246,13 +246,55 @@ This deploys the Angular app and Firebase bits to the "live" Firebase project. R
246
246
247
247
## Updating
248
248
249
-
### How to update your app to the latest base template
249
+
For apps built on this base template there are two things you need to do to keep updated to the latest dependencies and base template:
250
250
251
-
TODO
251
+
1._[Whenever you want]_ Update the dependencies in the `app` and `firebase` folders.
252
+
1._[When there's a new base template release]_ Perform specific tasks to match any new or updated base template bits, as specified in release notes, and at your discretion (depending on how far you've deviated from the base template, and what is relevant to your app).
252
253
253
-
### How to update dependencies
254
+
### 1. How to update dependencies
254
255
255
-
TODO
256
+
You can update some or all of the dependencies in the `app` and `firebase` folders using `pnpm` (our chosen pack manager):
257
+
258
+
For the `app` folder:
259
+
260
+
1. First run `pnpm ng update` and follow the instructions.
261
+
- This will update the Angular specific dependencies (and any other dependencies that support Angular Schematics).
262
+
- You can choose to skip this step, especially if there is a major version of Angular with breaking changes (in which case you could choose to wait until the base template has been updated first).
263
+
1. Then run `pnpm update --interactive --latest` and follow the instructions.
264
+
- You can select the packages you want to update.
265
+
266
+
For the `firebase` folder:
267
+
268
+
1. Run `pnpm update --interactive --latest` and follow the instructions.
269
+
- You can select the packages you want to update.
270
+
271
+
Make sure to do all this in a branch, test locally and push to GitHub, then open a PR to trigger the continuous integration pipeline (which runs the linter, tests, etc.) and wait until it's green. You'll also want to then do a deploy to your live Firebase project to make sure everything works as expected.
272
+
273
+
> [!IMPORTANT]
274
+
>
275
+
> This is like any other dependency update process and can sometimes require changes to your code. Especially with major version updates with breaking changes. We aim to keep the base template up-to-date with the latest versions of dependencies, and if these result in changes to the code we make a new release of the base template with specific instructions on what to do. See the next section for more on this.
276
+
277
+
> [!TIP]
278
+
>
279
+
> Sometimes, especially with major version updates, you may need to delete the `node_modules` folder and `pnpm-lock.yaml` file, and then run `pnpm install` to rebuild the dependency tree and lockfile. This ensures the very latest dependencies (matched to the versions defined in the relevant `package.json`) are used (especially subdependencies).
280
+
281
+
### 2. How to update your app to a base template release
282
+
283
+
> [!NOTE]
284
+
>
285
+
> Once the base template is launched and in a stable version, there are unlikely to be frequent changes, so hopefully you won't need to do this often.
286
+
>
287
+
> Also, we won't usually make releases for simple dependency updates, or content changes.
288
+
289
+
Whenever we make a new release of the base template we will provide detailed release notes with specific instructions on what to do to update your app. These will contain specific code changes you can make (some may be optional), and it will all depend on how much you have deviated from the base template, and what is relevant to your app.
290
+
291
+
> [!IMPORTANT]
292
+
>
293
+
> We use the `TEMPLATE_VERSION` file to track what the current version of the template is. You will have this in your app as well, as a reference for the version of the base template you started with (or last updated to). Use this to find the release notes (possibly multiple) to go through.
294
+
>
295
+
> **And make sure you update this `TEMPLATE_VERSION` file as part of your update process.**
296
+
297
+
Go to the [releases page](https://github.com/FullStacksDev/angular-and-firebase-template/releases) to find the release notes for the version(s) you want to update to.
0 commit comments