소스 검색

ref: overhaul build

Sv443 6 달 전
부모
커밋
2cc2ae0397
4개의 변경된 파일268개의 추가작업 그리고 172개의 파일을 삭제
  1. 43 5
      .vscode/settings.json
  2. 12 8
      package.json
  3. 188 155
      pnpm-lock.yaml
  4. 25 4
      tsconfig.json

+ 43 - 5
.vscode/settings.json

@@ -1,9 +1,47 @@
 {
-  "eslint.validate": [
-    "javascript",
-  ],
+  "javascript.preferences.importModuleSpecifier": "relative",
+  "typescript.tsdk": "node_modules/typescript/lib",
+
+  "search.exclude": {
+    "**/*.user.js": true,
+    "**/BetterYTM.css": true,
+  },
   "files.associations": {
-    ".env": "dotenv",
-    ".env.template": "dotenv",
+    "*.env": "dotenv",
+    "*.env.template": "dotenv",
+  },
+  "editor.tabSize": 2,
+
+  // requires extension: fabiospampinato.vscode-highlight
+  "highlight.regexes": {
+    "(TODO(\\((\\s|\\d|\\w|[,.-_+*&])+\\))?:?)": { // TODO: or TODO or TODO(xy): but not todo or todo:
+      "backgroundColor": "#ed0",
+      "color": "black",
+      "overviewRulerColor": "#ed0",
+    },
+    "((//\\s*|/\\*\\s*)?#region ([^\\S\\r\\n]*[\\(\\)\\w,.\\-_&+#*'\"/:]+)*)": { //#region test: (abc):
+      "backgroundColor": "#5df",
+      "color": "#000",
+      "overviewRulerColor": "#5df",
+    },
+    "((<!--\\s*)?</?\\{\\{[A-Z_-]+\\}\\}>(\\s*-->)?)": { // <!-- <{{FOO}}> --> and <!-- </{{FOO}}> --> or <{{BAR}}> and </{{BAR}}>
+      "backgroundColor": "#9af",
+      "overviewRulerColor": "#9af",
+      "color": "#000",
+    },
+    "(#?(DEBUG|DBG)#?)": { // #DEBUG or DEBUG or #DBG or #DBG#
+      "backgroundColor": "#ff0",
+      "color": "blue",
+      "overviewRulerColor": "#ff0",
+    },
+    "(IMPORTANT:)": { // IMPORTANT:
+      "backgroundColor": "#a22",
+      "color": "#fff",
+    },
+    "(FIXME:)": { // FIXME:
+      "backgroundColor": "#a22",
+      "color": "#fff",
+      "overviewRulerColor": "#752020",
+    },
   },
 }

+ 12 - 8
package.json

@@ -3,11 +3,13 @@
   "version": "2.0.0",
   "description": "Simple JSON and XML REST API to search for song metadata, the lyrics URL and lyrics translations on genius.com",
   "main": "src/index.ts",
+  "type": "module",
   "scripts": {
-    "start": "tsc && node --enable-source-maps out/src/index.js",
     "dev": "nodemon -e \"ts,d.ts\" -x \"pnpm start\"",
-    "www-dev": "cd www && pnpm run dev",
-    "www-build": "cd www && pnpm run build",
+    "start": "tsc && node --enable-source-maps out/src/index.js",
+    "dev-www": "cd www && pnpm run dev",
+    "build-www": "cd www && pnpm run build",
+    "dev-all": "concurrently \"pnpm dev\" \"pnpm dev-www\"",
     "lint": "eslint . && tsc --noEmit",
     "test": "start-server-and-test start http://localhost:8074 jest"
   },
@@ -36,37 +38,39 @@
     "pnpm": ">=9"
   },
   "dependencies": {
-    "axios": "^1.7.7",
+    "axios": "^1.7.8",
     "compression": "^1.7.5",
     "cors": "^2.8.5",
     "express": "^4.21.1",
     "helmet": "^7.2.0",
     "js2xmlparser": "^5.0.0",
     "kleur": "^4.1.5",
-    "nanoid": "^3.3.7",
+    "nanoid": "^3.3.8",
     "rate-limiter-flexible": "^2.4.2",
     "request-ip": "^3.3.0",
     "svcorelib": "^1.18.2",
-    "tcp-port-used": "^1.0.2"
+    "tcp-port-used": "^1.0.2",
+    "typescript": "^5.7.2"
   },
   "devDependencies": {
     "@types/compression": "^1.7.5",
     "@types/cors": "^2.8.17",
     "@types/express": "^4.17.21",
     "@types/jest": "^29.5.14",
-    "@types/node": "^20.17.6",
+    "@types/node": "^20.17.9",
     "@types/request-ip": "^0.0.41",
     "@types/tcp-port-used": "^1.0.4",
     "@typescript-eslint/eslint-plugin": "^6.21.0",
     "@typescript-eslint/parser": "^6.21.0",
     "@vuepress/plugin-seo": "2.0.0-rc.3",
     "@vuepress/plugin-sitemap": "2.0.0-rc.3",
+    "concurrently": "^9.1.0",
     "dotenv": "^16.4.5",
     "eslint": "^8.57.1",
     "jest": "^29.7.0",
     "nodemon": "^3.1.7",
     "percentile": "^1.6.0",
-    "pnpm": "^9.13.2",
+    "pnpm": "^9.14.2",
     "start-server-and-test": "^2.0.8",
     "ts-jest": "^29.2.5",
     "ts-node": "^10.9.2",

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 188 - 155
pnpm-lock.yaml


+ 25 - 4
tsconfig.json

@@ -1,5 +1,14 @@
 {
   "compilerOptions": {
+    "module": "NodeNext",
+    "moduleResolution": "NodeNext",
+    "target": "ES2021",
+    "lib": [
+      "ES5",
+      "ES6",
+      "DOM",
+      "DOM.Iterable"
+    ],
     "allowJs": false,
     "allowSyntheticDefaultImports": true,
     "baseUrl": ".",
@@ -7,8 +16,6 @@
     "forceConsistentCasingInFileNames": true,
     "importHelpers": true,
     "isolatedModules": true,
-    "module": "CommonJS",
-    "moduleResolution": "node",
     "noUncheckedIndexedAccess": true,
     "outDir": "./out/",
     "resolveJsonModule": true,
@@ -16,7 +23,21 @@
     "skipLibCheck": true,
     "sourceMap": true,
     "strict": true,
-    "target": "es2022",
     "useDefineForClassFields": true,
-  }
+    "noImplicitThis": false,
+  },
+  "ts-node": {
+    "esm": true,
+    "preferTsExts": true,
+  },
+  "include": [
+    "src/**/*.ts",
+    "src/**/*.d.ts",
+    "www/**/*.ts",
+    "www/**/*.d.ts",
+  ],
+  "exclude": [
+    "**/dist/**",
+    "**/dev/**",
+  ],
 }

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.