Begin move to TS

This commit is contained in:
Jonathan Barrow 2023-04-21 10:07:54 -04:00
parent 471a1efb23
commit c3759db11b
No known key found for this signature in database
GPG Key ID: E86E9FE9049C741F
3 changed files with 795 additions and 10 deletions

771
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,13 @@
{
"name": "pretendoverse",
"version": "1.0.0",
"name": "miiverse-api",
"version": "2.0.0",
"description": "Miiverse API Server",
"main": "./src/server.js",
"main": "./dist/server.js",
"scripts": {
"start": "node ./src/server.js",
"test": "echo \"Error: no test specified\" && exit 1"
"build": "npm run clean && npx tsc && npx tsc-alias",
"clean": "rm -rf ./dist",
"start": "node .",
"start:dev": "NODE_ENV=development node ."
},
"keywords": [],
"author": "Jemma",
@ -41,6 +43,8 @@
"object-to-xml": "^2.0.0",
"request": "^2.88.2",
"string-sanitizer": "^1.1.1",
"tsc-alias": "^1.8.5",
"typescript": "^5.0.4",
"xml2json": "^0.12.0"
}
}
}

18
tsconfig.json Normal file
View File

@ -0,0 +1,18 @@
{
"compilerOptions": {
"strict": true,
"resolveJsonModule": true,
"module": "commonjs",
"esModuleInterop": true,
"moduleResolution": "node",
"baseUrl": "src",
"outDir": "dist",
"allowJs": true,
"target": "es2022",
"noEmitOnError": true,
"paths": {
"@/*": ["./*"]
}
},
"include": ["src"]
}