diff --git a/common/package.json b/common/package.json new file mode 100644 index 00000000..68e7a56b --- /dev/null +++ b/common/package.json @@ -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" + } +} diff --git a/common/tsconfig.json b/common/tsconfig.json new file mode 100644 index 00000000..2dd3998d --- /dev/null +++ b/common/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../tsconfig.json", + "include": ["src/**/*.ts"], + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist", + "resolveJsonModule": true + } +} diff --git a/package-lock.json b/package-lock.json index c54f2f5f..863bd035 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "license": "MIT", "workspaces": [ "backend", + "common", "frontend", "docs" ], @@ -81,6 +82,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "common": { + "name": "dwengo-1-common", + "version": "0.1.1" + }, "docs": { "name": "dwengo-1-docs", "version": "0.0.1", @@ -4011,6 +4016,10 @@ "resolved": "backend", "link": true }, + "node_modules/dwengo-1-common": { + "resolved": "common", + "link": true + }, "node_modules/dwengo-1-docs": { "resolved": "docs", "link": true diff --git a/package.json b/package.json index 7adeb3aa..56e3d01c 100644 --- a/package.json +++ b/package.json @@ -5,14 +5,15 @@ "private": true, "type": "module", "scripts": { - "build": "npm run build --ws", - "format": "npm run format --ws", - "format-check": "npm run format-check --ws", - "lint": "npm run lint --ws", - "test:unit": "npm run test:unit --ws" + "build": "npm run build --workspace=backend --workspace=frontend", + "format": "npm run format --workspace=backend --workspace=common --workspace=frontend", + "format-check": "npm run format-check --workspace=backend --workspace=common --workspace=frontend", + "lint": "npm run lint --workspace=backend --workspace=common --workspace=frontend", + "test:unit": "npm run test:unit --workspace=backend --workspace=frontend" }, "workspaces": [ "backend", + "common", "frontend", "docs" ],