docs: update docs example dependencies to version 8 (#30385)
PR Close #30385
This commit is contained in:

committed by
Jason Aden

parent
660a091f41
commit
661a57d9e2
@ -17,21 +17,23 @@ As mentioned, many of the documentation pages contain snippets extracted from re
|
||||
To achieve that, all those applications needs to contain a basic boilerplate. E.g. a `node_modules`
|
||||
folder, `package.json` with scripts, etc.
|
||||
|
||||
No one wants to maintain the boilerplate on each example, so the goal of this tool is to provide a
|
||||
set of boilerplates that works in all the examples.
|
||||
No one wants to maintain the boilerplate on each example, so the goal of this tool is to provide a set of files that works across all the examples.
|
||||
|
||||
### Boilerplate files
|
||||
|
||||
Inside `/aio/tools/examples/shared/boilerplate` you will find a set of folders representing each
|
||||
boilerplate.
|
||||
Inside `/aio/tools/examples/shared/boilerplate` you will find a set of folders representing each project type.
|
||||
|
||||
Currently you will find the next boilerplates:
|
||||
Currently you will find the next project types:
|
||||
|
||||
|
||||
* CLI - For CLI based examples. This is the default one, to be used in the majority of the examples.
|
||||
* cli - For CLI based examples. This is the default one, to be used in the majority of the examples.
|
||||
* getting-started - CLI-based with its own set of styles.
|
||||
* i18n - CLI-based with additional scripts for internationalization.
|
||||
* ivy - CLI-based with additional configuration for running the examples with the Ivy renderer and ngstc compiler.
|
||||
* schematics - CLI-based with additional scripts for building schematics.
|
||||
* service-worker - CLI-based with additional packages and configuration for service workers.
|
||||
* systemjs - Currently in deprecation, only used in a few examples.
|
||||
* i18n - Based on the CLI one, features a few scripts for i18n.
|
||||
* universal - Based on the cli with a extra server for universal.
|
||||
* testing - CLI-based with additional styles for jasmine testing.
|
||||
* universal - CLI-based with an extra server target.
|
||||
|
||||
There is also a `common` folder that contains files used in all different examples.
|
||||
|
||||
@ -41,11 +43,14 @@ Each example is identified by an **example-config.json** configuration file in i
|
||||
This configuration file indicates what type of boilerplate this example needs. E.g.
|
||||
|
||||
```json
|
||||
{ projectType: 'universal' }
|
||||
{
|
||||
"projectType": "cli",
|
||||
"useCommonBoilerplate": true
|
||||
}
|
||||
```
|
||||
|
||||
If the file is empty then the default type of cli is assumed.
|
||||
When the boilerplate tooling runs, it will copy into the example folder all of the appropriate boilerplate files.
|
||||
When the boilerplate tooling runs, it will copy into the example folder all of the appropriate files based on the project type.
|
||||
|
||||
### A node_modules to share
|
||||
|
||||
@ -89,4 +94,13 @@ that name.
|
||||
It also has an optional `--setup` flag to run the `example-boilerplate.js` script and install
|
||||
the latest `webdriver`.
|
||||
|
||||
It will create a `/aio/protractor-results-txt` file when it finishes running tests.
|
||||
It will create a `/aio/protractor-results.txt` file when it finishes running tests.
|
||||
|
||||
### Updating example dependencies
|
||||
|
||||
With every major release, we update the examples to be on the latest version. The following steps to update are:
|
||||
|
||||
* In the `shared/package.json` file, bump all the `@angular/*`, `@angular-devkit/*`, `rxjs`, `typescript`, and `zone.js` package versions to the version that corresponds with the [framework version](../../../package.json).
|
||||
* In the `shared` folder, run `yarn` to update the dependencies for the shared `node_modules` and the `yarn.lock` file.
|
||||
* In the `boilerplate` folder, go through each sub-folder and update the `package.json` dependencies if one is present.
|
||||
* Follow the [update guide](./shared/boilerplate/UPDATING_CLI.md) to update the common files used in the examples based on project type.
|
Reference in New Issue
Block a user