浏览代码

调整文件路径解析代码格式

在 `webpack_config_prod.js`、`webpack_config_dev.js` 和 `webpack_config_github.js` 中,将文件路径解析的代码进行了换行处理,以提高代码的可读性。同时,在 `package.json` 中移除了对 `.ts` 文件的调试 lint 脚本配置。
SongZihuan 3 月之前
父节点
当前提交
b6ecca6250
共有 4 个文件被更改,包括 19 次插入7 次删除
  1. 1 1
      package.json
  2. 6 2
      webpack_config_dev.js
  3. 6 2
      webpack_config_github.js
  4. 6 2
      webpack_config_prod.js

+ 1 - 1
package.json

@@ -27,7 +27,7 @@
   "scripts": {
     "init": "npx pnpm install",
     "lint": "eslint --ext .js,.mjs,.cjs,.ts --fix .",
-    "lint:debug": "eslint --ext .js,.mjs,.cjs,.ts --debug --fix .",
+    "lint:debug": "eslint --ext .js,.mjs,.cjs --debug --fix .",
     "dev": "npx webpack server --config webpack_config_dev.js",
     "build:dev": "npx webpack --config webpack_config_dev.js",
     "build:dev:run": "npx pnpm build:dev && npx pnpm dev",

+ 6 - 2
webpack_config_dev.js

@@ -13,7 +13,9 @@ const dist_name = 'dist-dev'
 
 const HTMMLPlugin = []
 
-const { localPathResult: AllHTMLLocalFile4xx } = filetool.filewaalk.getAllFilePaths(path.resolve(__dirname, 'src/html/error/4xx'))
+const { localPathResult: AllHTMLLocalFile4xx } = filetool.filewaalk.getAllFilePaths(
+  path.resolve(__dirname, 'src/html/error/4xx')
+)
 AllHTMLLocalFile4xx.forEach((filePath) => {
   if (!filePath.endsWith('.html')) {
     return
@@ -56,7 +58,9 @@ AllHTMLLocalFile4xx.forEach((filePath) => {
   )
 })
 
-const { localPathResult: AllHTMLLocalFile5xx } = filetool.filewaalk.getAllFilePaths(path.resolve(__dirname, 'src/html/error/5xx'))
+const { localPathResult: AllHTMLLocalFile5xx } = filetool.filewaalk.getAllFilePaths(
+  path.resolve(__dirname, 'src/html/error/5xx')
+)
 AllHTMLLocalFile5xx.forEach((filePath) => {
   if (!filePath.endsWith('.html')) {
     return

+ 6 - 2
webpack_config_github.js

@@ -27,7 +27,9 @@ const html_minify = {
 
 const HTMMLPlugin = []
 
-const { localPathResult: AllHTMLLocalFile4xx } = filetool.filewaalk.getAllFilePaths(path.resolve(__dirname, 'src/html/error/4xx'))
+const { localPathResult: AllHTMLLocalFile4xx } = filetool.filewaalk.getAllFilePaths(
+  path.resolve(__dirname, 'src/html/error/4xx')
+)
 AllHTMLLocalFile4xx.forEach((filePath) => {
   if (!filePath.endsWith('.html')) {
     return
@@ -70,7 +72,9 @@ AllHTMLLocalFile4xx.forEach((filePath) => {
   )
 })
 
-const { localPathResult: AllHTMLLocalFile5xx } = filetool.filewaalk.getAllFilePaths(path.resolve(__dirname, 'src/html/error/5xx'))
+const { localPathResult: AllHTMLLocalFile5xx } = filetool.filewaalk.getAllFilePaths(
+  path.resolve(__dirname, 'src/html/error/5xx')
+)
 AllHTMLLocalFile5xx.forEach((filePath) => {
   if (!filePath.endsWith('.html')) {
     return

+ 6 - 2
webpack_config_prod.js

@@ -26,7 +26,9 @@ const html_minify = {
 
 const HTMMLPlugin = []
 
-const { localPathResult: AllHTMLLocalFile4xx } = filetool.filewaalk.getAllFilePaths(path.resolve(__dirname, 'src/html/error/4xx'))
+const { localPathResult: AllHTMLLocalFile4xx } = filetool.filewaalk.getAllFilePaths(
+  path.resolve(__dirname, 'src/html/error/4xx')
+)
 AllHTMLLocalFile4xx.forEach((filePath) => {
   if (!filePath.endsWith('.html')) {
     return
@@ -69,7 +71,9 @@ AllHTMLLocalFile4xx.forEach((filePath) => {
   )
 })
 
-const { localPathResult: AllHTMLLocalFile5xx } = filetool.filewaalk.getAllFilePaths(path.resolve(__dirname, 'src/html/error/5xx'))
+const { localPathResult: AllHTMLLocalFile5xx } = filetool.filewaalk.getAllFilePaths(
+  path.resolve(__dirname, 'src/html/error/5xx')
+)
 AllHTMLLocalFile5xx.forEach((filePath) => {
   if (!filePath.endsWith('.html')) {
     return