Skip to content

Commit 1061d53

Browse files
Quentigusevilaliv3
authored andcommitted
angular 20 + fix server + demo standalone
1 parent 33f641d commit 1061d53

37 files changed

+4587
-7228
lines changed

.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+
server/tmp/*
3+
!.gitkeep
24

35
# compiled output
46
/dist

angular.json

Lines changed: 61 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
"projectType": "library",
1111
"root": "projects/ngx-flow",
1212
"sourceRoot": "projects/ngx-flow/src",
13-
"prefix": "lib",
13+
"prefix": "flow",
1414
"architect": {
1515
"build": {
16-
"builder": "@angular-devkit/build-angular:ng-packagr",
16+
"builder": "@angular/build:ng-packagr",
1717
"options": {
1818
"project": "projects/ngx-flow/ng-package.json"
1919
},
@@ -28,14 +28,25 @@
2828
"defaultConfiguration": "production"
2929
},
3030
"test": {
31-
"builder": "@angular-devkit/build-angular:karma",
31+
"builder": "@angular/build:karma",
3232
"options": {
3333
"polyfills": [
3434
"zone.js",
3535
"zone.js/testing"
3636
],
3737
"tsConfig": "projects/ngx-flow/tsconfig.spec.json",
38-
"karmaConfig": "projects/ngx-flow/karma.conf.js"
38+
"karmaConfig": "projects/ngx-flow/karma.conf.js",
39+
"codeCoverage": true
40+
}
41+
},
42+
"lint": {
43+
"builder": "@angular-eslint/builder:lint",
44+
"options": {
45+
"lintFilePatterns": [
46+
"projects/ngx-flow/**/*.ts",
47+
"projects/ngx-flow/**/*.html"
48+
],
49+
"eslintConfig": "projects/ngx-flow/eslint.config.js"
3950
}
4051
}
4152
}
@@ -48,7 +59,7 @@
4859
"prefix": "app",
4960
"architect": {
5061
"build": {
51-
"builder": "@angular-devkit/build-angular:application",
62+
"builder": "@angular/build:application",
5263
"options": {
5364
"outputPath": "dist/ngx-flow-demo",
5465
"index": "projects/ngx-flow-demo/src/index.html",
@@ -64,7 +75,8 @@
6475
"styles": [
6576
"projects/ngx-flow-demo/src/styles.css"
6677
],
67-
"scripts": []
78+
"scripts": [],
79+
"ssr": false
6880
},
6981
"configurations": {
7082
"production": {
@@ -91,7 +103,7 @@
91103
"defaultConfiguration": "production"
92104
},
93105
"serve": {
94-
"builder": "@angular-devkit/build-angular:dev-server",
106+
"builder": "@angular/build:dev-server",
95107
"configurations": {
96108
"production": {
97109
"buildTarget": "ngx-flow-demo:build:production"
@@ -103,30 +115,68 @@
103115
"defaultConfiguration": "development"
104116
},
105117
"extract-i18n": {
106-
"builder": "@angular-devkit/build-angular:extract-i18n",
118+
"builder": "@angular/build:extract-i18n",
107119
"options": {
108120
"buildTarget": "ngx-flow-demo:build"
109121
}
110122
},
111123
"test": {
112-
"builder": "@angular-devkit/build-angular:karma",
124+
"builder": "@angular/build:karma",
113125
"options": {
114126
"polyfills": [
115127
"zone.js",
116128
"zone.js/testing"
117129
],
118-
"tsConfig": "projects/ngx-flow-demo/tsconfig.spec.json",
119130
"assets": [
120131
"projects/ngx-flow-demo/src/favicon.ico",
121132
"projects/ngx-flow-demo/src/assets"
122133
],
123134
"styles": [
124135
"projects/ngx-flow-demo/src/styles.css"
125136
],
126-
"scripts": []
137+
"scripts": [],
138+
"tsConfig": "projects/ngx-flow-demo/tsconfig.spec.json",
139+
"karmaConfig": "projects/ngx-flow-demo/karma.conf.js",
140+
"codeCoverage": true
141+
}
142+
},
143+
"lint": {
144+
"builder": "@angular-eslint/builder:lint",
145+
"options": {
146+
"lintFilePatterns": [
147+
"projects/ngx-flow-demo/**/*.ts",
148+
"projects/ngx-flow-demo/**/*.html"
149+
],
150+
"eslintConfig": "projects/ngx-flow-demo/eslint.config.js"
127151
}
128152
}
129153
}
130154
}
155+
},
156+
"schematics": {
157+
"@schematics/angular:component": {
158+
"type": "component"
159+
},
160+
"@schematics/angular:directive": {
161+
"type": "directive"
162+
},
163+
"@schematics/angular:service": {
164+
"type": "service"
165+
},
166+
"@schematics/angular:guard": {
167+
"typeSeparator": "."
168+
},
169+
"@schematics/angular:interceptor": {
170+
"typeSeparator": "."
171+
},
172+
"@schematics/angular:module": {
173+
"typeSeparator": "."
174+
},
175+
"@schematics/angular:pipe": {
176+
"typeSeparator": "."
177+
},
178+
"@schematics/angular:resolver": {
179+
"typeSeparator": "."
180+
}
131181
}
132182
}

eslint.config.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// @ts-check
2+
const eslint = require("@eslint/js");
3+
const tseslint = require("typescript-eslint");
4+
const angular = require("angular-eslint");
5+
6+
module.exports = tseslint.config(
7+
{
8+
files: ["**/*.ts"],
9+
extends: [
10+
eslint.configs.recommended,
11+
...tseslint.configs.recommended,
12+
...tseslint.configs.stylistic,
13+
...angular.configs.tsRecommended,
14+
],
15+
processor: angular.processInlineTemplates,
16+
rules: {
17+
"@typescript-eslint/no-explicit-any": "warn",
18+
"@angular-eslint/directive-selector": [
19+
"error",
20+
{
21+
type: "attribute",
22+
prefix: "flow",
23+
style: "camelCase",
24+
},
25+
],
26+
"@angular-eslint/component-selector": [
27+
"error",
28+
{
29+
type: "element",
30+
prefix: "flow",
31+
style: "kebab-case",
32+
},
33+
],
34+
},
35+
},
36+
{
37+
files: ["**/*.html"],
38+
extends: [
39+
...angular.configs.templateRecommended,
40+
...angular.configs.templateAccessibility,
41+
],
42+
rules: {},
43+
}
44+
);

karma.base.js

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Karma configuration file, see link for more information
2+
// https://karma-runner.github.io/1.0/config/configuration-file.html
3+
4+
module.exports = function (config, project) {
5+
config.set({
6+
basePath: '',
7+
frameworks: ['jasmine'],
8+
plugins: [
9+
require('karma-jasmine'),
10+
require('karma-chrome-launcher'),
11+
require('karma-jasmine-html-reporter'),
12+
require('karma-coverage'),
13+
require('karma-spec-reporter')
14+
],
15+
client: {
16+
jasmine: {
17+
// you can add configuration options for Jasmine here
18+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19+
// for example, you can disable the random execution with `random: false`
20+
// or set a specific seed with `seed: 4321`
21+
},
22+
clearContext: false // leave Jasmine Spec Runner output visible in browser
23+
},
24+
jasmineHtmlReporter: {
25+
suppressAll: true // removes the duplicated traces
26+
},
27+
coverageReporter: {
28+
dir: require('path').resolve(process.cwd(), 'coverage/' + project),
29+
subdir: '.',
30+
reporters: [
31+
{type: 'html'},
32+
{type: 'text-summary'}
33+
]
34+
},
35+
specReporter: {
36+
maxLogLines: 5,
37+
suppressErrorSummary: true,
38+
suppressFailed: false,
39+
suppressPassed: false,
40+
suppressSkipped: false,
41+
showSpecTiming: true
42+
},
43+
customLaunchers: {
44+
ChromeHeadlessCI: {
45+
base: 'ChromeHeadless',
46+
flags: [
47+
'--no-sandbox',
48+
'--headless',
49+
'--disable-setuid-sandbox',
50+
'--disable-translate',
51+
'--disable-extensions',
52+
'--disable-gpu',
53+
'--ignore-certificate-errors'
54+
]
55+
}
56+
},
57+
reporters: ['spec', 'kjhtml'],
58+
port: 9876,
59+
colors: true,
60+
logLevel: config.LOG_INFO,
61+
browsers: ['ChromeHeadless']
62+
});
63+
};

0 commit comments

Comments
 (0)