修改项目配置
This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -5,7 +5,7 @@
|
|||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"command": "npm run build-client-and-server",
|
"command": "npm run debug",
|
||||||
"name": "Debug",
|
"name": "Debug",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"type": "node-terminal"
|
"type": "node-terminal"
|
||||||
|
|||||||
7
.vscode/settings.json
vendored
7
.vscode/settings.json
vendored
@@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"deno.enable": false,
|
|
||||||
"deno.disablePaths": [
|
|
||||||
"./thewhitesilk_data",
|
|
||||||
"./mdui_patched"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
import process from 'node:process'
|
|
||||||
import child_process from 'node:child_process'
|
|
||||||
import fs from 'node:fs/promises'
|
|
||||||
|
|
||||||
function spawn(exec: string, args: string[]) {
|
|
||||||
child_process.spawnSync(exec, args, {
|
|
||||||
stdio: [process.stdin, process.stdout, process.stderr]
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function runBuild() {
|
|
||||||
const args = [
|
|
||||||
"run",
|
|
||||||
"-A",
|
|
||||||
"--node-modules-dir",
|
|
||||||
]
|
|
||||||
let i = 0
|
|
||||||
for (const arg of process.argv) {
|
|
||||||
if (i > 1)
|
|
||||||
args.push(arg)
|
|
||||||
i++
|
|
||||||
}
|
|
||||||
|
|
||||||
spawn('deno', args)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (process.platform == 'android') {
|
|
||||||
try {
|
|
||||||
await fs.stat('./node_modules/.deno/rollup@4.50.1/node_modules/rollup/')
|
|
||||||
} catch (e) {
|
|
||||||
spawn('deno', ['install', '--node-modules-dir=auto'])
|
|
||||||
}
|
|
||||||
spawn('sh', ["fix-build-on-android.sh"])
|
|
||||||
}
|
|
||||||
|
|
||||||
runBuild()
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
rm -r ./node_modules/.deno/rollup@4.50.1/node_modules/rollup/
|
|
||||||
cp -r ./node_modules/.deno/@rollup+wasm-node@4.48.0/node_modules/@rollup/wasm-node/ node_modules/.deno/rollup@4.50.1/node_modules/rollup/
|
|
||||||
echo Replaced rollup with @rollup/wasm-node successfully
|
|
||||||
18
client/tsconfig.json
Normal file
18
client/tsconfig.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ES2022",
|
||||||
|
"lib": [
|
||||||
|
"ES2022",
|
||||||
|
"DOM",
|
||||||
|
"DOM.Iterable"
|
||||||
|
],
|
||||||
|
"jsx": "react-jsx",
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "Bundler",
|
||||||
|
"allowImportingTsExtensions": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"strict": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"noEmit": true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,7 +8,8 @@
|
|||||||
"./client"
|
"./client"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build-client-and-server": "npm run build-client && npm run server",
|
"install-dependencies": "npm install -d --workspaces",
|
||||||
|
"debug": "npm run build-client && npx tsx --watch ./server/main.ts",
|
||||||
"server": "npx tsx ./server/main.ts",
|
"server": "npx tsx ./server/main.ts",
|
||||||
"build-client": "cd client && npm run build"
|
"build-client": "cd client && npm run build"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user