This commit revises the app-shell and ssr schematics to incorporate the new Server Rendering API, along with the integration of server-side routes.
BREAKING CHANGE: The app-shell schematic is no longer compatible with Webpack-based builders.
Updates for all angular.io links to the new angular.dev domain. Additionally, adjustment to new resources where the equivalent does not exist on the new site (e.g. Tour of Heroes tutorial)
The use of the custom path functions from `@angular-devkit/core` have been
removed in favor of the built-in functions from Node.js. These provide
equivalent functionality with an improvement in performance. The amount
of custom code executed has also been reduced.
The import of the `findAppConfig` function was unused within the schematic.
The TypeScript import was also changed to the recommended default import from
a namespace import.
This commit updates the `ng generate application` to use the esbuild `application` builder. This also updates the schematics to support both `browser` and `application` builders.
BREAKING CHANGE: `rootModuleClassName`, `rootModuleFileName` and `main` options have been removed from the public `pwa` and `app-shell` schematics.
Code related to decoding buffers into strings and parsing content into JSON can now be removed by using the
support provided directly from the Tree instance for the executing schematic.
The `no-useless-escape` eslint rule has now been enabled which removes unneeded characters and complexity from string literals and regular expressions. All files that were in violation of this rule have also been corrected.
All TypeScript files have been updated to pass the new eslint-based linting checks. eslint compatible disabling comments have also been added in place of the previous tslint comments.
With this change we do several changes to the `angular.json` configuration for `build` , `server` and `app-shell` targets so that these are `production` by default.
- build, server and app-shell targets are configured to run production by default.
- We add a new configuration named `development` to run the mentioned builder targets in development. Ex: `ng build --configuration development`.
- When adding `universal` or `app-shell`, we generate the full set of configurations as per the `buiid` target. Previously, we only generated the `production` configuration.
- We added a helper script in `package.json` to run build in watch mode. `npm run watch` which is a shortcut for `ng build --watch --configuration development`
This change introduces a helper function (`applyToUpdateRecorder`) that handles all known `Change` classes. The use of this helper function removes type assumptions within the schematics. Many of these assumptions caused compilation errors when strict TypeScript options are enabled.
By leveraging TypeScript's AST type guards, function parameter assumptions and casting can be removed. Many of these cases caused errors when enabling TypeScript's strict option. This is preliminary work to support enabling full TypeScript strict mode within the project.
BREAKING CHANGE: The below options have been removed as they had no effect
- `test` and `testTsconfigFileName` have been removed form the universal schematic
- `universalProject`, `name`, `outDir`, `root` and `index` have been removed from the app-shell schematic