From 66f7e843d0b9140786f24347519b4ef5412060d3 Mon Sep 17 00:00:00 2001 From: Odboy Date: Sun, 4 Feb 2024 17:16:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BC=8F=E6=8F=90=E4=BA=A4=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/.browserslistrc | 2 ++ web/.editorconfig | 5 +++++ web/.env | 17 +++++++++++++++++ web/.env.daily | 17 +++++++++++++++++ web/.env.development | 4 ++++ web/.env.production | 14 ++++++++++++++ web/.env.staging | 17 +++++++++++++++++ web/.eslintignore | 14 ++++++++++++++ web/.eslintrc.js | 28 ++++++++++++++++++++++++++++ web/.gitignore | 21 +++++++++++++++++++++ web/.postcssrc.js | 5 +++++ 11 files changed, 144 insertions(+) create mode 100644 web/.browserslistrc create mode 100644 web/.editorconfig create mode 100644 web/.env create mode 100644 web/.env.daily create mode 100644 web/.env.development create mode 100644 web/.env.production create mode 100644 web/.env.staging create mode 100644 web/.eslintignore create mode 100644 web/.eslintrc.js create mode 100644 web/.gitignore create mode 100644 web/.postcssrc.js diff --git a/web/.browserslistrc b/web/.browserslistrc new file mode 100644 index 0000000..d6471a3 --- /dev/null +++ b/web/.browserslistrc @@ -0,0 +1,2 @@ +> 1% +last 2 versions diff --git a/web/.editorconfig b/web/.editorconfig new file mode 100644 index 0000000..7053c49 --- /dev/null +++ b/web/.editorconfig @@ -0,0 +1,5 @@ +[*.{js,jsx,ts,tsx,vue}] +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/web/.env b/web/.env new file mode 100644 index 0000000..756b2e9 --- /dev/null +++ b/web/.env @@ -0,0 +1,17 @@ +# 所有环境默认 + +# 页面 title 前缀 +VUE_APP_TITLE=D2Admin + +# 网络请求公用地址 +VUE_APP_API=/api/ + +; # 仓库地址 +; VUE_APP_REPO=https://github.com/d2-projects/d2-admin-start-kit + +# 国际化配置 +VUE_APP_I18N_LOCALE=zh-chs +VUE_APP_I18N_FALLBACK_LOCALE=en + +# element 颜色 +VUE_APP_ELEMENT_COLOR=#409EFF diff --git a/web/.env.daily b/web/.env.daily new file mode 100644 index 0000000..be84fb1 --- /dev/null +++ b/web/.env.daily @@ -0,0 +1,17 @@ +# 日常环境 + +# 指定构建模式 +NODE_ENV=production + +# 页面 title 前缀 +VUE_APP_TITLE=D2Admin + +# 网络请求公用地址 +VUE_APP_API=http://localhost:8001/api + +# 国际化配置 +VUE_APP_I18N_LOCALE=zh-chs +VUE_APP_I18N_FALLBACK_LOCALE=en + +# element 颜色 +VUE_APP_ELEMENT_COLOR=#409EFF diff --git a/web/.env.development b/web/.env.development new file mode 100644 index 0000000..1ec1580 --- /dev/null +++ b/web/.env.development @@ -0,0 +1,4 @@ +# 开发环境 + +# 页面 title 前缀 +VUE_APP_TITLE=D2Admin diff --git a/web/.env.production b/web/.env.production new file mode 100644 index 0000000..4c2beb7 --- /dev/null +++ b/web/.env.production @@ -0,0 +1,14 @@ +# 生产环境 + +# 页面 title 前缀 +VUE_APP_TITLE=D2Admin + +# 网络请求公用地址 +VUE_APP_API=/api/ + +# 国际化配置 +VUE_APP_I18N_LOCALE=zh-chs +VUE_APP_I18N_FALLBACK_LOCALE=en + +# element 颜色 +VUE_APP_ELEMENT_COLOR=#409EFF diff --git a/web/.env.staging b/web/.env.staging new file mode 100644 index 0000000..4111f06 --- /dev/null +++ b/web/.env.staging @@ -0,0 +1,17 @@ +# 预发环境 + +# 指定构建模式 +NODE_ENV=production + +# 页面 title 前缀 +VUE_APP_TITLE=D2Admin + +# 网络请求公用地址 +VUE_APP_API=/api/ + +# 国际化配置 +VUE_APP_I18N_LOCALE=zh-chs +VUE_APP_I18N_FALLBACK_LOCALE=en + +# element 颜色 +VUE_APP_ELEMENT_COLOR=#409EFF diff --git a/web/.eslintignore b/web/.eslintignore new file mode 100644 index 0000000..effd0e3 --- /dev/null +++ b/web/.eslintignore @@ -0,0 +1,14 @@ +# 忽略目录 +build/ +tests/ +node_modules/ + +# D2CRUD 演示 +src/views/demo/d2-crud/ + +# node 覆盖率文件 +coverage/ + +# 忽略文件 +**/*-min.js +**/*.min.js diff --git a/web/.eslintrc.js b/web/.eslintrc.js new file mode 100644 index 0000000..67e0477 --- /dev/null +++ b/web/.eslintrc.js @@ -0,0 +1,28 @@ +module.exports = { + root: true, + env: { + node: true + }, + 'extends': [ + 'plugin:vue/essential', + '@vue/standard' + ], + rules: { + 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', + 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' + }, + parserOptions: { + parser: 'babel-eslint' + }, + overrides: [ + { + files: [ + '**/__tests__/*.{j,t}s?(x)', + '**/tests/unit/**/*.spec.{j,t}s?(x)' + ], + env: { + jest: true + } + } + ] +} diff --git a/web/.gitignore b/web/.gitignore new file mode 100644 index 0000000..a0dddc6 --- /dev/null +++ b/web/.gitignore @@ -0,0 +1,21 @@ +.DS_Store +node_modules +/dist + +# local env files +.env.local +.env.*.local + +# Log files +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/web/.postcssrc.js b/web/.postcssrc.js new file mode 100644 index 0000000..961986e --- /dev/null +++ b/web/.postcssrc.js @@ -0,0 +1,5 @@ +module.exports = { + plugins: { + autoprefixer: {} + } +}