build(docs-infra): simplify ExampleZipper
by removing PackageJsonCustomizer
(#38192)
Previously, `ExampleZipper` (the tool used for creating ZIP archives from our docs examples) used the `PackageJsonCustomizer` to generate `package.json` files for each example type. This had the following drawbacks: - The generated files had to be kept up-to-date with the corresponding boilerplate files in `aio/tools/examples/shared/boilerplate/` and there was no easy way to find out when the files got out-of-sync. - The `PackageJsonCustomizer` logic was non-trivial and difficult to reason about. - The same information was duplicated in the boilerplate files and the customizer configuration files. This setup was useful when we used a single `package.json` file for all docs examples. Now, however, each example type can have its own boilerplate `package.json` file, including scripts and dependencies relevant to the example type. Therefore, it is no longer necessary to generate `package.json` files for ZIP archives. This commit eliminates the drawbacks mentioned above and simplifies the `ExampleZipper` tool by removing `PackageJsonCustomizer` and re-using the boilerplate `package.json` files for ZIP archives. The changes in this commit also fix some ZIP archives that were previously broken (for example due to missing dependencies). PR Close #38192
This commit is contained in:

committed by
Misko Hevery

parent
7f455e6eec
commit
f411c9e5b9
@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "angular-examples",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"description": "Example package.json, only contains needed scripts for examples. See _examples/package.json for master package.json.",
|
||||
"name": "angular.io-example",
|
||||
"version": "0.0.0",
|
||||
"description": "Example project from an angular.io guide.",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "tsc -p src/",
|
||||
"build:watch": "tsc -p src/ -w",
|
||||
@ -25,26 +25,25 @@
|
||||
"serve:aot": "lite-server -c bs-config.aot.json",
|
||||
"copy-dist-files": "node ./copy-dist-files.js"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~9.0.3",
|
||||
"@angular/common": "~9.0.3",
|
||||
"@angular/compiler": "~9.0.3",
|
||||
"@angular/core": "~9.0.3",
|
||||
"@angular/forms": "~9.0.3",
|
||||
"@angular/platform-browser": "~9.0.3",
|
||||
"@angular/platform-browser-dynamic": "~9.0.3",
|
||||
"@angular/router": "~9.0.3",
|
||||
"@angular/upgrade": "~9.0.3",
|
||||
"@angular/animations": "~9.1.4",
|
||||
"@angular/common": "~9.1.4",
|
||||
"@angular/compiler": "~9.1.4",
|
||||
"@angular/core": "~9.1.4",
|
||||
"@angular/forms": "~9.1.4",
|
||||
"@angular/platform-browser": "~9.1.4",
|
||||
"@angular/platform-browser-dynamic": "~9.1.4",
|
||||
"@angular/router": "~9.1.4",
|
||||
"@angular/upgrade": "~9.1.4",
|
||||
"core-js": "^2.5.4",
|
||||
"rxjs": "~6.5.4",
|
||||
"tslib": "^1.10.0",
|
||||
"zone.js": "~0.10.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/compiler-cli": "~9.0.3",
|
||||
"@angular/compiler-cli": "~9.1.4",
|
||||
"@angular/language-service": "~9.1.4",
|
||||
"@types/angular": "1.6.47",
|
||||
"@types/angular-animate": "1.5.10",
|
||||
"@types/angular-mocks": "1.6.0",
|
||||
@ -68,6 +67,5 @@
|
||||
"rollup-plugin-terser": "^5.3.0",
|
||||
"tslint": "~5.18.0",
|
||||
"typescript": "~3.7.5"
|
||||
},
|
||||
"repository": {}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user