Pārlūkot izejas kodu

feat: add `cloc`

xiaoxian521 2 gadi atpakaļ
vecāks
revīzija
d2cd29a838
2 mainītis faili ar 12 papildinājumiem un 0 dzēšanām
  1. 2 0
      package.json
  2. 10 0
      pnpm-lock.yaml

+ 2 - 0
package.json

@@ -10,6 +10,7 @@
     "report": "rimraf dist && cross-env vite build",
     "preview": "vite preview",
     "preview:build": "pnpm build && vite preview",
+    "cloc": "cross-env --max_old_space_size=4096 cloc . --exclude-dir=node_modules --exclude-lang=YAML",
     "clean:cache": "rm -rf node_modules && rm -rf .eslintcache && pnpm install",
     "lint:eslint": "eslint --cache --max-warnings 0  \"{src,mock}/**/*.{vue,ts,tsx}\" --fix",
     "lint:prettier": "prettier --write  \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"",
@@ -112,6 +113,7 @@
     "@vue/eslint-config-typescript": "^10.0.0",
     "@vue/runtime-core": "^3.2.37",
     "autoprefixer": "^10.4.5",
+    "cloc": "^2.9.0",
     "cross-env": "7.0.3",
     "eslint": "^8.8.0",
     "eslint-plugin-prettier": "^4.0.0",

+ 10 - 0
pnpm-lock.yaml

@@ -48,6 +48,7 @@ specifiers:
   autoprefixer: ^10.4.5
   axios: ^0.27.2
   china-area-data: ^5.0.1
+  cloc: ^2.9.0
   cropperjs: ^1.5.12
   cross-env: 7.0.3
   css-color-function: ^1.3.3
@@ -205,6 +206,7 @@ devDependencies:
   "@vue/eslint-config-typescript": 10.0.0_7f105dc3ebd31cec885fdbbd30d5cc4c
   "@vue/runtime-core": 3.2.37
   autoprefixer: 10.4.7_postcss@8.4.13
+  cloc: 2.9.0
   cross-env: 7.0.3
   eslint: 8.15.0
   eslint-plugin-prettier: 4.0.0_eslint@8.15.0+prettier@2.6.2
@@ -3170,6 +3172,14 @@ packages:
       wrap-ansi: 7.0.0
     dev: true
 
+  /cloc/2.9.0:
+    resolution:
+      {
+        integrity: sha512-Eo97MtQ5nozSd5CFcYgwUg5Ej7GVcdopVd5T+SGwJc3VAmu0vNxV/ZDl06QAQhCUkM2EGKl8nhhP1BZuQXGiZg==
+      }
+    hasBin: true
+    dev: true
+
   /clone-regexp/2.2.0:
     resolution:
       {