refactor(common): Introduceer common package

This commit is contained in:
Tibo De Peuter 2025-03-31 18:31:12 +02:00
parent da2729eeca
commit 8bf927d1c9
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
4 changed files with 36 additions and 5 deletions

12
common/package.json Normal file
View file

@ -0,0 +1,12 @@
{
"name": "dwengo-1-common",
"version": "0.1.1",
"description": "Common types and utilities for Dwengo-1",
"private": true,
"type": "module",
"scripts": {
"format": "prettier --write src/",
"format-check": "prettier --check src/",
"lint": "eslint . --fix"
}
}

9
common/tsconfig.json Normal file
View file

@ -0,0 +1,9 @@
{
"extends": "../tsconfig.json",
"include": ["src/**/*.ts"],
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist",
"resolveJsonModule": true
}
}

9
package-lock.json generated
View file

@ -10,6 +10,7 @@
"license": "MIT", "license": "MIT",
"workspaces": [ "workspaces": [
"backend", "backend",
"common",
"frontend", "frontend",
"docs" "docs"
], ],
@ -81,6 +82,10 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"common": {
"name": "dwengo-1-common",
"version": "0.1.1"
},
"docs": { "docs": {
"name": "dwengo-1-docs", "name": "dwengo-1-docs",
"version": "0.0.1", "version": "0.0.1",
@ -4011,6 +4016,10 @@
"resolved": "backend", "resolved": "backend",
"link": true "link": true
}, },
"node_modules/dwengo-1-common": {
"resolved": "common",
"link": true
},
"node_modules/dwengo-1-docs": { "node_modules/dwengo-1-docs": {
"resolved": "docs", "resolved": "docs",
"link": true "link": true

View file

@ -5,14 +5,15 @@
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
"build": "npm run build --ws", "build": "npm run build --workspace=backend --workspace=frontend",
"format": "npm run format --ws", "format": "npm run format --workspace=backend --workspace=common --workspace=frontend",
"format-check": "npm run format-check --ws", "format-check": "npm run format-check --workspace=backend --workspace=common --workspace=frontend",
"lint": "npm run lint --ws", "lint": "npm run lint --workspace=backend --workspace=common --workspace=frontend",
"test:unit": "npm run test:unit --ws" "test:unit": "npm run test:unit --workspace=backend --workspace=frontend"
}, },
"workspaces": [ "workspaces": [
"backend", "backend",
"common",
"frontend", "frontend",
"docs" "docs"
], ],