Skip to content

Commit

Permalink
feat(core): update site-template to ng 15
Browse files Browse the repository at this point in the history
  • Loading branch information
why520crazy committed Mar 20, 2023
1 parent e563102 commit 2aac8ff
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 152 deletions.
6 changes: 3 additions & 3 deletions .docgeni/public/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"moduleResolution": "node",
"esModuleInterop": false,
"importHelpers": true,
"target": "es2015",
"target": "ES2022",
"useDefineForClassFields": false,
"lib": [
"es2018",
"dom"
Expand All @@ -34,8 +35,7 @@
}
},
"files": [
"src/main.ts",
"src/polyfills.ts"
"src/main.ts"
],
"include": [
"src/**/*.d.ts"
Expand Down
3 changes: 1 addition & 2 deletions examples/full/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
]
},
"files": [
"src/test.ts",
"src/polyfills.ts"
"src/test.ts"
],
"include": [
"src/**/*.spec.ts",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"lint:lib": "eslint -c ./.eslintrc.json --ignore-pattern '/packages/core/src/site-template/' \"./packages/?(cli|core|toolkit)/src/**/*.ts\"",
"lint:ng": "ng lint",
"e2e": "ng e2e",
"build:docs": "cross-env DOCGENI_ENV=development ts-node --project ./packages/cli/tsconfig.json ./packages/cli/bin/docgeni build",
"build:docs:prod": "yarn build:deps && cross-env DOCGENI_ENV=development ts-node --project ./packages/cli/tsconfig.json ./packages/cli/bin/docgeni build --configuration production",
"build-docs": "cross-env DOCGENI_ENV=development ts-node --project ./packages/cli/tsconfig.json ./packages/cli/bin/docgeni build",
"build-docs:dev": "yarn build:deps && cross-env DOCGENI_ENV=development ts-node --project ./packages/cli/tsconfig.json ./packages/cli/bin/docgeni build --configuration development",
"build-gh-pages": "cross-env DOCGENI_ENV=development ts-node --project ./packages/cli/tsconfig.json ./packages/cli/bin/docgeni build --configuration production --base-href=/docgeni/",
"tsc": "tsc -p ./packages/docgeni",
"preinstall": "node scripts/check-yarn.js",
Expand Down
3 changes: 2 additions & 1 deletion packages/a-lib/button/button.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
/**
* General Button Component description.
* @name alib-button
* @order 1
*/
@Component({
selector: 'alib-button,[alibButton]',
Expand Down Expand Up @@ -82,7 +83,7 @@ export class AlibButtonComponent implements OnInit {
/**
* Button Service
* @name ButtonService
* @order 1
* @order 2
*/
@Injectable({
providedIn: 'root'
Expand Down
11 changes: 3 additions & 8 deletions packages/core/src/site-template/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { AppModule } from './app/app.module';
import { environment } from './environments/environment';

if (environment.production) {
enableProdMode();
}


platformBrowserDynamic().bootstrapModule(AppModule);
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch(err => console.error(err));
62 changes: 0 additions & 62 deletions packages/core/src/site-template/src/polyfills.ts

This file was deleted.

38 changes: 5 additions & 33 deletions packages/core/src/templates/angular-json.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
"outputPath": "{{ outputPath }}",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets",
Expand Down Expand Up @@ -69,7 +70,8 @@
"sourceMap": true,
"namedChunks": true
}
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
Expand All @@ -93,36 +95,6 @@
"options": {
"browserTarget": "site:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "packages/site/src/test.ts",
"polyfills": "packages/site/src/polyfills.ts",
"tsConfig": "packages/site/tsconfig.spec.json",
"karmaConfig": "packages/site/karma.conf.js",
"assets": [
"packages/site/src/favicon.ico",
"packages/site/src/assets"
],
"styles": [
"packages/site/src/styles.scss"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"packages/site/tsconfig.app.json",
"packages/site/tsconfig.spec.json",
"packages/site/e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/templates/tsconfig-app-json.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"moduleResolution": "node",
"esModuleInterop": false,
"importHelpers": true,
"target": "es2015",
"target": "es2022",
"useDefineForClassFields": false,
"lib": [
"es2020",
"dom"
Expand All @@ -26,8 +27,7 @@
}
},
"files": [
"src/main.ts",
"src/polyfills.ts"
"src/main.ts"
],
"include": [
"src/**/*.d.ts"
Expand Down
38 changes: 5 additions & 33 deletions packages/core/test/fixtures/default-site/output/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
"outputPath": "../../dist/docgeni-site",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets",
Expand Down Expand Up @@ -69,7 +70,8 @@
"sourceMap": true,
"namedChunks": true
}
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
Expand All @@ -93,36 +95,6 @@
"options": {
"browserTarget": "site:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "packages/site/src/test.ts",
"polyfills": "packages/site/src/polyfills.ts",
"tsConfig": "packages/site/tsconfig.spec.json",
"karmaConfig": "packages/site/karma.conf.js",
"assets": [
"packages/site/src/favicon.ico",
"packages/site/src/assets"
],
"styles": [
"packages/site/src/styles.scss"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"packages/site/tsconfig.app.json",
"packages/site/tsconfig.spec.json",
"packages/site/e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"moduleResolution": "node",
"esModuleInterop": false,
"importHelpers": true,
"target": "es2015",
"target": "es2022",
"useDefineForClassFields": false,
"lib": [
"es2020",
"dom"
Expand All @@ -23,8 +24,7 @@
}
},
"files": [
"src/main.ts",
"src/polyfills.ts"
"src/main.ts"
],
"include": [
"src/**/*.d.ts"
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"types": []
},
"files": [
"src/main.ts",
"src/polyfills.ts"
"src/main.ts"
],
"include": [
"src/**/*.d.ts"
Expand Down

0 comments on commit 2aac8ff

Please sign in to comment.