Skip to content

Commit ba42385

Browse files
angular 14, align with webapps
1 parent 7ca89ff commit ba42385

28 files changed

+25321
-11780
lines changed

.eslintrc.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["projects/**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts"],
7+
"parserOptions": {
8+
"project": ["tsconfig.json"],
9+
"createDefaultProgram": true
10+
},
11+
"extends": [
12+
"plugin:prettier/recommended",
13+
"plugin:@angular-eslint/recommended"
14+
],
15+
"rules": {
16+
"@angular-eslint/directive-selector": [
17+
"error",
18+
{
19+
"type": "attribute",
20+
"prefix": "ngx",
21+
"style": "camelCase"
22+
}
23+
],
24+
"@angular-eslint/component-selector": [
25+
"error",
26+
{
27+
"type": "element",
28+
"prefix": "ngx",
29+
"style": "kebab-case"
30+
}
31+
]
32+
}
33+
},
34+
{
35+
"files": ["*.html"],
36+
"extends": ["plugin:prettier/recommended"],
37+
"rules": {
38+
"prettier/prettier": ["error", { "parser": "angular" }]
39+
}
40+
},
41+
{
42+
"files": ["*.html"],
43+
"extends": ["plugin:@angular-eslint/template/recommended"],
44+
"rules": {}
45+
}
46+
]
47+
}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
# angular cache
3+
/.angular
24

35
# compiled output
46
/dist

.npmrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
registry=https://diit-nex.eastus.cloudapp.azure.com/repository/npm-all/
2+
//diit-nex.eastus.cloudapp.azure.com/repository/npm-all/:_authToken={DIIT_NEX_TOKEN}
3+
4+
@dedalusdiit:registry=https://npm.pkg.github.com
5+
//npm.pkg.github.com/:_authToken={PKG_TOKEN}

.prettierignore

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# Compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
/bazel-out
8+
9+
# Node
10+
/node_modules
11+
npm-debug.log
12+
yarn-error.log
13+
14+
# IDEs and editors
15+
.idea/
16+
.project
17+
.classpath
18+
.c9/
19+
*.launch
20+
.settings/
21+
*.sublime-workspace
22+
23+
# Visual Studio Code
24+
.vscode/*
25+
!.vscode/settings.json
26+
!.vscode/tasks.json
27+
!.vscode/launch.json
28+
!.vscode/extensions.json
29+
.history/*
30+
31+
# Miscellaneous
32+
/.angular/cache
33+
.sass-cache/
34+
/connect.lock
35+
/coverage
36+
/libpeerconnection.log
37+
testem.log
38+
/typings
39+
40+
# System files
41+
.DS_Store
42+
Thumbs.db
43+
44+
# Folders of OWASP dependency check and license check
45+
/dependency-check-bin/
46+
/dependency-check-reports/
47+
/licenses.json
48+
/projects/app-qc-iframe-test/src/assets/app-qc/
49+
/test-results/
50+
/playwright-report/
51+
/playwright/.cache/
52+
/allure-results/
53+
/allure-report/

.prettierrc.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"tabWidth": 2,
3+
"useTabs": false,
4+
"singleQuote": true,
5+
"semi": true,
6+
"bracketSpacing": true,
7+
"arrowParens": "avoid",
8+
"trailingComma": "es5",
9+
"bracketSameLine": true,
10+
"printWidth": 80
11+
}

.travis.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

angular.json

Lines changed: 55 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,14 @@
55
"projects": {
66
"angular-ngx-treeview": {
77
"projectType": "application",
8-
"schematics": {},
8+
"schematics": {
9+
"@schematics/angular:component": {
10+
"style": "scss"
11+
},
12+
"@schematics/angular:application": {
13+
"strict": true
14+
}
15+
},
916
"root": "",
1017
"sourceRoot": "src",
1118
"prefix": "ngx",
@@ -24,7 +31,17 @@
2431
"aot": true,
2532
"assets": [
2633
"src/favicon.ico",
27-
"src/assets"
34+
"src/assets",
35+
{
36+
"glob": "**/*.css",
37+
"input": "./node_modules/@orbis-u/styles",
38+
"output": "./assets/themes"
39+
},
40+
{
41+
"glob": "**/*",
42+
"input": "./src/assets/",
43+
"output": "/assets"
44+
}
2845
],
2946
"styles": [
3047
"src/styles.scss"
@@ -39,14 +56,6 @@
3956
"with": "src/environments/environment.prod.ts"
4057
}
4158
],
42-
"optimization": true,
43-
"outputHashing": "all",
44-
"sourceMap": false,
45-
"extractCss": true,
46-
"namedChunks": false,
47-
"extractLicenses": true,
48-
"vendorChunk": false,
49-
"buildOptimizer": true,
5059
"budgets": [
5160
{
5261
"type": "initial",
@@ -59,6 +68,23 @@
5968
"maximumError": "10kb"
6069
}
6170
]
71+
},
72+
"integration": {
73+
"fileReplacements": [
74+
{
75+
"replace": "src/environments/environment.ts",
76+
"with": "src/environments/environment.integration.ts"
77+
}
78+
],
79+
"outputHashing": "none"
80+
},
81+
"development": {
82+
"buildOptimizer": false,
83+
"optimization": false,
84+
"vendorChunk": true,
85+
"extractLicenses": false,
86+
"sourceMap": true,
87+
"namedChunks": true
6288
}
6389
}
6490
},
@@ -70,8 +96,12 @@
7096
"configurations": {
7197
"production": {
7298
"browserTarget": "angular-ngx-treeview:build:production"
99+
},
100+
"dev": {
101+
"browserTarget": "angular-ngx-treeview:build:development"
73102
}
74-
}
103+
},
104+
"defaultConfiguration": "dev"
75105
},
76106
"extract-i18n": {
77107
"builder": "@angular-devkit/build-angular:extract-i18n",
@@ -97,29 +127,13 @@
97127
}
98128
},
99129
"lint": {
100-
"builder": "@angular-devkit/build-angular:tslint",
130+
"builder": "@angular-eslint/builder:lint",
101131
"options": {
102-
"tsConfig": [
103-
"tsconfig.app.json",
104-
"tsconfig.spec.json",
105-
"e2e/tsconfig.json"
106-
],
107-
"exclude": [
108-
"**/node_modules/**"
132+
"lintFilePatterns": [
133+
"src/app/**/*.ts",
134+
"src/app/**/*.html"
109135
]
110136
}
111-
},
112-
"e2e": {
113-
"builder": "@angular-devkit/build-angular:protractor",
114-
"options": {
115-
"protractorConfig": "e2e/protractor.conf.js",
116-
"devServerTarget": "angular-ngx-treeview:serve"
117-
},
118-
"configurations": {
119-
"production": {
120-
"devServerTarget": "angular-ngx-treeview:serve:production"
121-
}
122-
}
123137
}
124138
}
125139
},
@@ -130,16 +144,20 @@
130144
"prefix": "ngx",
131145
"architect": {
132146
"build": {
133-
"builder": "@angular-devkit/build-ng-packagr:build",
147+
"builder": "@angular-devkit/build-angular:ng-packagr",
134148
"options": {
135149
"tsConfig": "projects/ngx-treeview/tsconfig.lib.json",
136150
"project": "projects/ngx-treeview/ng-package.json"
137151
},
138152
"configurations": {
139153
"production": {
140154
"tsConfig": "projects/ngx-treeview/tsconfig.lib.prod.json"
155+
},
156+
"development": {
157+
"tsConfig": "projects/ngx-treeview/tsconfig.lib.json"
141158
}
142-
}
159+
},
160+
"defaultConfiguration": "production"
143161
},
144162
"test": {
145163
"builder": "@angular-devkit/build-angular:karma",
@@ -150,14 +168,11 @@
150168
}
151169
},
152170
"lint": {
153-
"builder": "@angular-devkit/build-angular:tslint",
171+
"builder": "@angular-eslint/builder:lint",
154172
"options": {
155-
"tsConfig": [
156-
"projects/ngx-treeview/tsconfig.lib.json",
157-
"projects/ngx-treeview/tsconfig.spec.json"
158-
],
159-
"exclude": [
160-
"**/node_modules/**"
173+
"lintFilePatterns": [
174+
"projects/ngx-treeview/**/*.ts",
175+
"projects/ngx-treeview/**/*.html"
161176
]
162177
}
163178
}

e2e/protractor.conf.js

Lines changed: 0 additions & 36 deletions
This file was deleted.

e2e/src/app.e2e-spec.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

e2e/src/app.po.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)