Browse Source

chore: remove primeng from template

closes #2924
pull/2927/head
mehmet-erim 6 years ago
parent
commit
1c29ac629f
  1. 45
      npm/ng-packs/angular.json
  2. 8
      npm/ng-packs/apps/dev-app/src/app/app.component.ts
  3. 62
      templates/app/angular/angular.json
  4. 15
      templates/app/angular/src/app/app.component.ts

45
npm/ng-packs/angular.json

@ -56,7 +56,10 @@
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["packages/theme-shared/tsconfig.lib.json", "packages/theme-shared/tsconfig.spec.json"],
"tsConfig": [
"packages/theme-shared/tsconfig.lib.json",
"packages/theme-shared/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
}
}
@ -86,7 +89,10 @@
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["packages/theme-basic/tsconfig.lib.json", "packages/theme-basic/tsconfig.spec.json"],
"tsConfig": [
"packages/theme-basic/tsconfig.lib.json",
"packages/theme-basic/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
}
}
@ -115,7 +121,10 @@
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["packages/account/tsconfig.lib.json", "packages/account/tsconfig.spec.json"],
"tsConfig": [
"packages/account/tsconfig.lib.json",
"packages/account/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
}
}
@ -176,7 +185,10 @@
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["packages/identity/tsconfig.lib.json", "packages/identity/tsconfig.spec.json"],
"tsConfig": [
"packages/identity/tsconfig.lib.json",
"packages/identity/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
}
}
@ -333,7 +345,10 @@
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["packages/identity-config/tsconfig.lib.json", "packages/identity-config/tsconfig.spec.json"],
"tsConfig": [
"packages/identity-config/tsconfig.lib.json",
"packages/identity-config/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
}
}
@ -362,7 +377,10 @@
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["packages/account-config/tsconfig.lib.json", "packages/account-config/tsconfig.spec.json"],
"tsConfig": [
"packages/account-config/tsconfig.lib.json",
"packages/account-config/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
}
}
@ -434,21 +452,6 @@
"input": "node_modules/@fortawesome/fontawesome-free/css/v4-shims.min.css",
"lazy": true,
"bundleName": "fontawesome-v4-shims.min"
},
{
"input": "node_modules/primeng/resources/themes/nova-light/theme.css",
"lazy": true,
"bundleName": "primeng-nova-light-theme"
},
{
"input": "node_modules/primeicons/primeicons.css",
"lazy": true,
"bundleName": "primeicons"
},
{
"input": "node_modules/primeng/resources/primeng.min.css",
"lazy": true,
"bundleName": "primeng.min"
}
],
"scripts": []

8
npm/ng-packs/apps/dev-app/src/app/app.component.ts

@ -14,13 +14,7 @@ export class AppComponent implements OnInit {
ngOnInit() {
this.lazyLoadService
.load(
[
'primeng.min.css',
'primeicons.css',
'primeng-nova-light-theme.css',
'fontawesome-all.min.css',
'fontawesome-v4-shims.min.css',
],
['fontawesome-all.min.css', 'fontawesome-v4-shims.min.css'],
'style',
null,
'head',

62
templates/app/angular/angular.json

@ -3,7 +3,7 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"myProjectName": {
"MyProjectName": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
@ -17,12 +17,12 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/myProjectName",
"outputPath": "dist/MyProjectName",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": false,
"aot": true,
"extractCss": true,
"assets": ["src/favicon.ico", "src/assets"],
"styles": [
@ -30,28 +30,13 @@
"node_modules/bootstrap/dist/css/bootstrap.min.css",
{
"input": "node_modules/@fortawesome/fontawesome-free/css/all.min.css",
"lazy": true,
"inject": false,
"bundleName": "fontawesome-all.min"
},
{
"input": "node_modules/@fortawesome/fontawesome-free/css/v4-shims.min.css",
"lazy": true,
"inject": false,
"bundleName": "fontawesome-v4-shims.min"
},
{
"input": "node_modules/primeng/resources/themes/nova-light/theme.css",
"lazy": true,
"bundleName": "primeng-nova-light-theme"
},
{
"input": "node_modules/primeicons/primeicons.css",
"lazy": true,
"bundleName": "primeicons"
},
{
"input": "node_modules/primeng/resources/primeng.min.css",
"lazy": true,
"bundleName": "primeng.min"
}
],
"scripts": []
@ -69,7 +54,6 @@
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
@ -78,14 +62,11 @@
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
},
"hmr": {
"fileReplacements": [
},
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.hmr.ts"
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
@ -94,22 +75,18 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "myProjectName:build"
"browserTarget": "MyProjectName:build"
},
"configurations": {
"production": {
"browserTarget": "myProjectName:build:production"
},
"hmr": {
"hmr": true,
"browserTarget": "myProjectName:build:hmr"
"browserTarget": "MyProjectName:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "myProjectName:build"
"browserTarget": "MyProjectName:build"
}
},
"test": {
@ -123,10 +100,8 @@
"styles": [
"src/styles.scss",
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"node_modules/font-awesome/css/font-awesome.min.css",
"node_modules/primeng/resources/themes/nova-light/theme.css",
"node_modules/primeicons/primeicons.css",
"node_modules/primeng/resources/primeng.min.css"
"node_modules/@fortawesome/fontawesome-free/css/all.min.css",
"node_modules/@fortawesome/fontawesome-free/css/v4-shims.min.css"
],
"scripts": []
}
@ -142,16 +117,19 @@
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "myProjectName:serve"
"devServerTarget": "MyProjectName:serve"
},
"configurations": {
"production": {
"devServerTarget": "myProjectName:serve:production"
"devServerTarget": "MyProjectName:serve:production"
}
}
}
}
}
},
"defaultProject": "myProjectName"
"defaultProject": "MyProjectName",
"cli": {
"analytics": false
}
}

15
templates/app/angular/src/app/app.component.ts

@ -6,25 +6,18 @@ import { Component, OnInit } from '@angular/core';
template: `
<abp-loader-bar></abp-loader-bar>
<router-outlet></router-outlet>
`,
`
})
export class AppComponent implements OnInit {
constructor(private lazyLoadService: LazyLoadService) {}
ngOnInit() {
async ngOnInit() {
this.lazyLoadService
.load(
[
'primeng.min.css',
'primeicons.css',
'primeng-nova-light-theme.css',
'fontawesome-all.min.css',
'fontawesome-v4-shims.min.css',
],
['fontawesome-all.min.css', 'fontawesome-v4-shims.min.css'],
'style',
null,
'head',
'afterbegin',
'afterbegin'
)
.subscribe();
}

Loading…
Cancel
Save