build(docs-infra): clean up dependencies and npm scripts in `systemjs` docs examples (#36015)

Previously, the `package.json` files added as boilerplate to docs
example projects of type `systemjs` were incorrect/outdated. They
contained unused dependencies and npm scripts and omitted used
dependencies.

This is not a big issue, because these examples are not offered as live
StackBlitz examples or downloadable ZIP archives, but having incorrect
`package.json` files is confusing and makes it more complicated to
update these examples.

This commit updates the `package.json` templates for the `systemjs` docs
examples and other configuration files to include used dependencies (and
remove unused ones). It also removes unused npm scripts.

PR Close #36015
This commit is contained in:
George Kalpakas 2020-03-17 22:28:54 +02:00 committed by Andrew Kushnir
parent 5e45061a94
commit 5007b97db6
4 changed files with 66 additions and 22 deletions

View File

@ -1,5 +1,4 @@
// #docregion
import rollup from 'rollup'
import nodeResolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs';
import uglify from 'rollup-plugin-uglify'

View File

@ -13,32 +13,47 @@
{ "name": "serve:upgrade" },
{ "name": "build:aot" },
{ "name": "serve:aot" },
{ "name": "build:babel" },
{ "name": "copy-dist-files" },
{ "name": "i18n" }
{ "name": "copy-dist-files" }
],
"dependencies": [
"systemjs"
"@angular/animations",
"@angular/common",
"@angular/compiler",
"@angular/core",
"@angular/forms",
"@angular/platform-browser",
"@angular/platform-browser-dynamic",
"@angular/router",
"@angular/upgrade",
"rxjs",
"systemjs",
"tslib",
"zone.js"
],
"devDependencies": [
"@angular/compiler-cli",
"@types/angular",
"@types/angular-animate",
"@types/angular-cookies",
"@types/angular-mocks",
"@types/angular-resource",
"@types/angular-route",
"@types/angular-sanitize",
"babel-cli",
"babel-preset-angular2",
"babel-preset-es2015",
"canonical-path",
"http-server",
"@types/jasmine",
"@types/jasminewd2",
"@types/node",
"concurrently",
"http-server",
"jasmine-core",
"karma",
"karma-chrome-launcher",
"karma-jasmine",
"karma-jasmine-html-reporter",
"lite-server",
"protractor",
"rollup",
"rollup-plugin-commonjs",
"rollup-plugin-node-resolve",
"rollup-plugin-uglify",
"source-map-explorer"
"tslint",
"typescript"
]
}

View File

@ -1,5 +1,4 @@
// #docregion
import rollup from 'rollup'
import nodeResolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs';
import uglify from 'rollup-plugin-uglify'

View File

@ -22,22 +22,53 @@
"build:upgrade": "tsc",
"serve:upgrade": "http-server",
"build:cli": "ng build --no-progress",
"serve:cli": "http-server dist/",
"build:aot": "ngc -p tsconfig-aot.json && rollup -c rollup-config.js",
"serve:aot": "lite-server -c bs-config.aot.json",
"build:babel": "babel src -d src --extensions \".es6\" --source-maps",
"clean": "rimraf src/dist && rimraf src/app/*.js* && rimraf src/universal/*.js* && rimraf src/main.js*",
"copy-dist-files": "node ./copy-dist-files.js",
"i18n": "ng-xi18n"
"copy-dist-files": "node ./copy-dist-files.js"
},
"keywords": [],
"author": "",
"license": "MIT",
"dependencies": {},
"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",
"rxjs": "~6.5.4",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular/cli": "^1.2.0"
"@angular/compiler-cli": "~9.0.3",
"@types/angular": "1.6.47",
"@types/angular-animate": "1.5.10",
"@types/angular-mocks": "1.6.0",
"@types/angular-resource": "1.5.14",
"@types/angular-route": "1.3.5",
"@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
"concurrently": "^5.0.1",
"http-server": "^0.12.0",
"jasmine-core": "~3.5.0",
"karma": "~4.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"lite-server": "^2.2.2",
"protractor": "~5.4.3",
"rollup": "^1.1.0",
"rollup-plugin-commonjs": "^9.2.1",
"rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-uglify": "^1.0.1",
"tslint": "~5.18.0",
"typescript": "~3.7.5"
},
"repository": {}
}