mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
feat: use project references to build dependencies efficiently
This commit is contained in:
1 parent
d4c9d4577c
commit
33a1a110e8
10 files changed
+24
-8
No files matched your search
+6
-1
@@ -22,5 +22,10 @@
|
|||||||
"noFallthroughCasesInSwitch": true
|
"noFallthroughCasesInSwitch": true
|
||||||
},
|
},
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "src/**/*.js"],
|
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "src/**/*.js"],
|
||||||
"references": [{ "path": "./tsconfig.node.json" }]
|
"references": [
|
||||||
|
{ "path": "./tsconfig.node.json" },
|
||||||
|
{ "path": "../packages/utils" },
|
||||||
|
{ "path": "../packages/constants" },
|
||||||
|
{ "path": "../packages/file-graph" }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
+1
-3
@@ -13,9 +13,7 @@
|
|||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"app": "yarn workspace app dev",
|
"app": "yarn workspace app dev",
|
||||||
"build:deps": "concurrently \"yarn workspace @linux-odyssey/constants build\" \"yarn workspace @linux-odyssey/file-graph build\" \"yarn workspace @linux-odyssey/models build\" \"yarn workspace @linux-odyssey/utils build\"",
|
"build": "yarn workspace server build && yarn workspace app build && yarn workspace analytics build",
|
||||||
"build:apps": "concurrently \"yarn workspace app build\" \"yarn workspace server build\" \"yarn workspace analytics build\"",
|
|
||||||
"build": "yarn build:deps && yarn build:apps",
|
|
||||||
"dev": "concurrently -n \"App,Server\" -c \"bgBlue.bold,bgGreen.bold\" \"yarn workspace app dev\" \"yarn workspace server dev\"",
|
"dev": "concurrently -n \"App,Server\" -c \"bgBlue.bold,bgGreen.bold\" \"yarn workspace app dev\" \"yarn workspace server dev\"",
|
||||||
"server": "yarn workspace server dev",
|
"server": "yarn workspace server dev",
|
||||||
"cli": "yarn workspace client start",
|
"cli": "yarn workspace client start",
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"composite": true,
|
||||||
"outDir": "./dist"
|
"outDir": "./dist"
|
||||||
},
|
},
|
||||||
"include": ["*.js", "*.ts"],
|
"include": ["*.js", "*.ts"],
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"rootDir": "src",
|
"rootDir": "src",
|
||||||
|
"composite": true,
|
||||||
"outDir": "./dist"
|
"outDir": "./dist"
|
||||||
},
|
},
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
|
|||||||
@@ -15,3 +15,5 @@ export default async function connectDB(uri: string) {
|
|||||||
const db = await mongoose.connect(uri)
|
const db = await mongoose.connect(uri)
|
||||||
return db.connection.getClient()
|
return db.connection.getClient()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log('Loaded models package')
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"rootDir": "src",
|
"rootDir": "src",
|
||||||
|
"composite": true,
|
||||||
"outDir": "./dist"
|
"outDir": "./dist"
|
||||||
},
|
},
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"rootDir": "src",
|
"rootDir": "src",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
|
"composite": true,
|
||||||
"allowJs": false
|
"allowJs": false
|
||||||
},
|
},
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
|
|||||||
+2
-2
@@ -7,8 +7,8 @@
|
|||||||
"start": "node dist/index.js",
|
"start": "node dist/index.js",
|
||||||
"setup": "node dist/cli/setup.js",
|
"setup": "node dist/cli/setup.js",
|
||||||
"clean": "node dist/cli/clean.js",
|
"clean": "node dist/cli/clean.js",
|
||||||
"build": "tsc",
|
"build": "tsc -b",
|
||||||
"dev": "concurrently \"tsc -w\" \"sleep 5 && nodemon\"",
|
"dev": "concurrently \"tsc -b --watch\" \"sleep 5 && nodemon\"",
|
||||||
"build:quests": "node dist/cli/build.js"
|
"build:quests": "node dist/cli/build.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -4,5 +4,11 @@
|
|||||||
"outDir": "./dist"
|
"outDir": "./dist"
|
||||||
},
|
},
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"exclude": ["node_modules", "src/*.test.js", "dist"]
|
"exclude": ["node_modules", "src/*.test.js", "dist"],
|
||||||
|
"references": [
|
||||||
|
{ "path": "../packages/constants" },
|
||||||
|
{ "path": "../packages/file-graph" },
|
||||||
|
{ "path": "../packages/models" },
|
||||||
|
{ "path": "../packages/utils" }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
+2
-1
@@ -8,6 +8,7 @@
|
|||||||
"strict": true,
|
"strict": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"declaration": true
|
"declaration": true,
|
||||||
|
"declarationMap": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user