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: {} + } +}