Browse Source

chore: update ng to 11 in module template

pull/6175/head
bnymncoskuner 6 years ago
parent
commit
30682ffcc4
  1. 11
      templates/module/angular/angular.json
  2. 27
      templates/module/angular/package.json
  3. 2
      templates/module/angular/projects/dev-app/src/app/app-routing.module.ts
  4. 4
      templates/module/angular/projects/my-project-name/src/lib/my-project-name.component.spec.ts
  5. 1
      templates/module/angular/projects/my-project-name/tsconfig.lib.json
  6. 3
      templates/module/angular/projects/my-project-name/tsconfig.lib.prod.json

11
templates/module/angular/angular.json

@ -10,7 +10,7 @@
"prefix": "lib", "prefix": "lib",
"architect": { "architect": {
"build": { "build": {
"builder": "@angular-devkit/build-ng-packagr:build", "builder": "@angular-devkit/build-angular:ng-packagr",
"options": { "options": {
"tsConfig": "projects/my-project-name/tsconfig.lib.json", "tsConfig": "projects/my-project-name/tsconfig.lib.json",
"project": "projects/my-project-name/ng-package.json" "project": "projects/my-project-name/ng-package.json"
@ -61,8 +61,10 @@
"polyfills": "projects/dev-app/src/polyfills.ts", "polyfills": "projects/dev-app/src/polyfills.ts",
"tsConfig": "projects/dev-app/tsconfig.app.json", "tsConfig": "projects/dev-app/tsconfig.app.json",
"aot": true, "aot": true,
"extractCss": true, "allowedCommonJsDependencies": [
"allowedCommonJsDependencies": ["chart.js", "js-sha256"], "chart.js",
"js-sha256"
],
"assets": [ "assets": [
"projects/dev-app/src/favicon.ico", "projects/dev-app/src/favicon.ico",
"projects/dev-app/src/assets" "projects/dev-app/src/assets"
@ -95,7 +97,7 @@
}, },
{ {
"input": "node_modules/@abp/ng.theme.shared/styles/bootstrap-rtl.min.css", "input": "node_modules/@abp/ng.theme.shared/styles/bootstrap-rtl.min.css",
"inject": false, "inject": true,
"bundleName": "bootstrap-rtl.min" "bundleName": "bootstrap-rtl.min"
}, },
{ {
@ -119,7 +121,6 @@
"optimization": true, "optimization": true,
"outputHashing": "all", "outputHashing": "all",
"sourceMap": false, "sourceMap": false,
"extractCss": true,
"namedChunks": false, "namedChunks": false,
"extractLicenses": true, "extractLicenses": true,
"vendorChunk": false, "vendorChunk": false,

27
templates/module/angular/package.json

@ -20,36 +20,35 @@
"@abp/ng.setting-management": "~3.3.1", "@abp/ng.setting-management": "~3.3.1",
"@abp/ng.tenant-management": "~3.3.1", "@abp/ng.tenant-management": "~3.3.1",
"@abp/ng.theme.basic": "~3.3.1", "@abp/ng.theme.basic": "~3.3.1",
"@angular/animations": "~10.1.2", "@angular/animations": "~11.0.0",
"@angular/common": "~10.1.2", "@angular/common": "~11.0.0",
"@angular/compiler": "~10.1.2", "@angular/compiler": "~11.0.0",
"@angular/core": "~10.1.2", "@angular/core": "~11.0.0",
"@angular/forms": "~10.1.2", "@angular/forms": "~11.0.0",
"@angular/platform-browser": "~10.1.2", "@angular/platform-browser": "~11.0.0",
"@angular/platform-browser-dynamic": "~10.1.2", "@angular/platform-browser-dynamic": "~11.0.0",
"@angular/router": "~10.1.2", "@angular/router": "~11.0.0",
"rxjs": "~6.6.3", "rxjs": "~6.6.3",
"tslib": "^2.0.0", "tslib": "^2.0.0",
"zone.js": "~0.10.2" "zone.js": "~0.10.2"
}, },
"devDependencies": { "devDependencies": {
"@abp/ng.schematics": "~3.3.1", "@abp/ng.schematics": "~3.3.1",
"@angular-devkit/build-angular": "~0.1001.2", "@angular-devkit/build-angular": "~0.1100.0",
"@angular-devkit/build-ng-packagr": "~0.1001.2", "@angular/cli": "~11.0.0",
"@angular/cli": "~10.1.2", "@angular/compiler-cli": "~11.0.0",
"@angular/compiler-cli": "~10.1.2",
"@types/jasmine": "~3.5.0", "@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3", "@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1", "@types/node": "^12.11.1",
"codelyzer": "^6.0.0", "codelyzer": "^6.0.0",
"jasmine-core": "~3.6.0", "jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0", "jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0", "karma": "~5.1.1",
"karma-chrome-launcher": "~3.1.0", "karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2", "karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0", "karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0", "karma-jasmine-html-reporter": "^1.5.0",
"ng-packagr": "^10.0.0", "ng-packagr": "^11.0.1",
"protractor": "~7.0.0", "protractor": "~7.0.0",
"symlink-manager": "^1.5.0", "symlink-manager": "^1.5.0",
"ts-node": "~8.3.0", "ts-node": "~8.3.0",

2
templates/module/angular/projects/dev-app/src/app/app-routing.module.ts

@ -43,7 +43,7 @@ const routes: Routes = [
]; ];
@NgModule({ @NgModule({
imports: [RouterModule.forRoot(routes)], imports: [RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' })],
exports: [RouterModule], exports: [RouterModule],
}) })
export class AppRoutingModule {} export class AppRoutingModule {}

4
templates/module/angular/projects/my-project-name/src/lib/my-project-name.component.spec.ts

@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { MyProjectNameComponent } from './my-project-name.component'; import { MyProjectNameComponent } from './my-project-name.component';
@ -6,7 +6,7 @@ describe('MyProjectNameComponent', () => {
let component: MyProjectNameComponent; let component: MyProjectNameComponent;
let fixture: ComponentFixture<MyProjectNameComponent>; let fixture: ComponentFixture<MyProjectNameComponent>;
beforeEach(async(() => { beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ MyProjectNameComponent ] declarations: [ MyProjectNameComponent ]
}) })

1
templates/module/angular/projects/my-project-name/tsconfig.lib.json

@ -2,6 +2,7 @@
"extends": "../../tsconfig.prod.json", "extends": "../../tsconfig.prod.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../../out-tsc/lib", "outDir": "../../out-tsc/lib",
"declarationMap": true,
"target": "es2015", "target": "es2015",
"declaration": true, "declaration": true,
"inlineSources": true, "inlineSources": true,

3
templates/module/angular/projects/my-project-name/tsconfig.lib.prod.json

@ -1,5 +1,8 @@
{ {
"extends": "./tsconfig.lib.json", "extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": { "angularCompilerOptions": {
"enableIvy": false "enableIvy": false
} }

Loading…
Cancel
Save