Skip to content

Commit 3d8052e

Browse files
author
Gérard Collin
committed
feature: working default plugin
1 parent 87c7cd6 commit 3d8052e

16 files changed

Lines changed: 158 additions & 320 deletions

File tree

common/config/rush/pnpm-lock.yaml

Lines changed: 121 additions & 160 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/xt-default/.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ trim_trailing_whitespace = true
1010

1111
[*.ts]
1212
quote_type = single
13+
ij_typescript_use_double_quotes = false
1314

1415
[*.md]
1516
max_line_length = off

plugins/xt-default/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ yarn-error.log
2626
!.vscode/tasks.json
2727
!.vscode/launch.json
2828
!.vscode/extensions.json
29+
!.vscode/mcp.json
2930
.history/*
3031

3132
# Miscellaneous
@@ -36,6 +37,7 @@ yarn-error.log
3637
/libpeerconnection.log
3738
testem.log
3839
/typings
40+
__screenshots__/
3941

4042
# System files
4143
.DS_Store

plugins/xt-default/.prettierrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"printWidth": 100,
3+
"singleQuote": true,
4+
"overrides": [
5+
{
6+
"files": "*.html",
7+
"options": {
8+
"parser": "angular"
9+
}
10+
}
11+
]
12+
}

plugins/xt-default/angular.json

Lines changed: 8 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616
"prefix": "lib",
1717
"architect": {
1818
"build": {
19-
"builder": "@angular-devkit/build-angular:ng-packagr",
20-
"options": {
21-
"project": "projects/default/ng-package.json"
22-
},
19+
"builder": "@angular/build:ng-packagr",
2320
"configurations": {
2421
"production": {
2522
"tsConfig": "projects/default/tsconfig.lib.prod.json"
@@ -31,35 +28,27 @@
3128
"defaultConfiguration": "development"
3229
},
3330
"test": {
34-
"builder": "@angular-builders/jest:run",
31+
"builder": "@angular/build:unit-test",
3532
"options": {
36-
"tsConfig": "projects/default/tsconfig.spec.json",
37-
"polyfills": [
38-
]
33+
"tsConfig": "projects/default/tsconfig.spec.json"
3934
}
4035
}
4136
}
4237
},
4338
"default-plugin": {
4439
"projectType": "application",
45-
"schematics": {
46-
"@schematics/angular:component": {
47-
"style": "css"
48-
}
49-
},
40+
"schematics": {},
5041
"root": "projects/default-plugin",
5142
"sourceRoot": "projects/default-plugin/src",
5243
"prefix": "app",
5344
"architect": {
5445
"build": {
55-
"builder": "@angular-devkit/build-angular:application",
46+
"builder": "@angular/build:application",
5647
"options": {
5748
"outputPath": "dist/default-plugin",
5849
"index": "projects/default-plugin/src/index.html",
5950
"browser": "projects/default-plugin/src/main.ts",
60-
"polyfills": [],
6151
"tsConfig": "projects/default-plugin/tsconfig.app.json",
62-
"inlineStyleLanguage": "css",
6352
"assets": [
6453
{
6554
"glob": "**/*",
@@ -68,8 +57,7 @@
6857
],
6958
"styles": [
7059
"projects/default-plugin/src/styles.css"
71-
],
72-
"scripts": []
60+
]
7361
},
7462
"configurations": {
7563
"production": {
@@ -96,7 +84,7 @@
9684
"defaultConfiguration": "production"
9785
},
9886
"serve": {
99-
"builder": "@angular-devkit/build-angular:dev-server",
87+
"builder": "@angular/build:dev-server",
10088
"configurations": {
10189
"production": {
10290
"buildTarget": "default-plugin:build:production"
@@ -107,26 +95,8 @@
10795
},
10896
"defaultConfiguration": "development"
10997
},
110-
"extract-i18n": {
111-
"builder": "@angular-devkit/build-angular:extract-i18n"
112-
},
11398
"test": {
114-
"builder": "@analogjs/vitest-angular:test",
115-
"options": {
116-
"polyfills": [],
117-
"tsConfig": "projects/default-plugin/tsconfig.spec.json",
118-
"inlineStyleLanguage": "css",
119-
"assets": [
120-
{
121-
"glob": "**/*",
122-
"input": "projects/default-plugin/public"
123-
}
124-
],
125-
"styles": [
126-
"projects/default-plugin/src/styles.css"
127-
],
128-
"scripts": []
129-
}
99+
"builder": "@angular/build:unit-test"
130100
}
131101
}
132102
}

plugins/xt-default/package.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"build": "ng build default",
88
"build-deploy": "APP=default-plugin && MAIN_LIB=default && ng build $MAIN_LIB --configuration=$BUILD && ng build $APP --configuration=$BUILD --output-path=\"../../dist/$STAGE/$APP\" --base-href=\"https://dont-code.net/apps/$STAGE/$APP/\"",
99
"watch": "ng build --watch --configuration development",
10-
"test": "cd projects/default && ../../node_modules/.bin/vitest && cd ../default-plugin && ../../node_modules/.bin/vitest"
10+
"test": "ng test default && ng test default-plugin"
1111
},
1212
"publishConfig": {
1313
"directory": "dist/xt-plugin-default",
@@ -38,17 +38,12 @@
3838
"date-fns": "~4.1.0"
3939
},
4040
"devDependencies": {
41-
"@angular-devkit/build-angular": "^21.2.6",
41+
"@angular/build": "^21.2.6",
4242
"@angular/cli": "^21.2.6",
4343
"@angular/compiler-cli": "^21.2.7",
44-
"@emnapi/core": "^1.9.2",
45-
"@emnapi/runtime": "^1.9.2",
4644
"ng-packagr": "^21.2.2",
4745
"typescript": "^5.9.3",
48-
"@analogjs/vite-plugin-angular": "^2.4.0",
49-
"@analogjs/vitest-angular": "^2.4.0",
5046
"jsdom": "^29.0.1",
51-
"vite": "^8.0.3",
5247
"vitest": "^4.1.2",
5348
"happy-dom": "^20.8.9",
5449
"@tailwindcss/postcss": "~4.2.2",

plugins/xt-default/projects/default-plugin/src/app/app.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ApplicationConfig, provideZonelessChangeDetection } from '@angular/core';
1+
import { ApplicationConfig, provideZonelessChangeDetection, provideBrowserGlobalErrorListeners } from '@angular/core';
22
import { provideRouter } from '@angular/router';
33

44
import { routes } from './app.routes';
@@ -8,6 +8,7 @@ import Aura from '@primeuix/themes/aura';
88

99
export const appConfig: ApplicationConfig = {
1010
providers: [provideZonelessChangeDetection(),
11+
provideBrowserGlobalErrorListeners(),
1112
provideAnimationsAsync(),
1213
providePrimeNG({
1314
theme: {

plugins/xt-default/projects/default-plugin/src/test-setup.ts

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

plugins/xt-default/projects/default-plugin/tsconfig.app.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
"outDir": "../../out-tsc/app",
77
"types": []
88
},
9-
"files": [
10-
"src/main.ts"
11-
],
12-
"include": [
13-
"src/**/*.d.ts"
14-
]
9+
"include": ["src/**/*.ts"],
10+
"exclude": ["src/**/*.spec.ts"]
1511
}

plugins/xt-default/projects/default-plugin/tsconfig.spec.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,7 @@
44
"extends": "../../tsconfig.json",
55
"compilerOptions": {
66
"outDir": "../../out-tsc/spec",
7-
"target": "es2016",
8-
"types": [
9-
"vitest/globals","node"
10-
],
11-
"emitDecoratorMetadata": true
7+
"types": ["vitest/globals"]
128
},
13-
"files": ["src/test-setup.ts"],
14-
"include": [
15-
"src/**/*.spec.ts",
16-
"src/**/*.d.ts"
17-
]
9+
"include": ["src/**/*.d.ts", "src/**/*.spec.ts"]
1810
}

0 commit comments

Comments
 (0)