From 62ba7a5a53d2d675c55512549cfb5e98e1117946 Mon Sep 17 00:00:00 2001 From: vben Date: Sat, 24 Oct 2020 01:52:37 +0800 Subject: [PATCH] chore: remove Chinese path warning --- CHANGELOG.zh_CN.md | 2 ++ build/script/cli.ts | 5 ----- build/script/postinstall.ts | 15 --------------- build/script/preserve.ts | 24 ++++++++++++++---------- package.json | 2 -- src/layouts/default/multitabs/index.less | 2 +- yarn.lock | 23 +---------------------- 7 files changed, 18 insertions(+), 55 deletions(-) delete mode 100644 build/script/postinstall.ts diff --git a/CHANGELOG.zh_CN.md b/CHANGELOG.zh_CN.md index 002cf599..45955921 100644 --- a/CHANGELOG.zh_CN.md +++ b/CHANGELOG.zh_CN.md @@ -11,6 +11,8 @@ - 表单重置逻辑修改 - 关闭多标签页 tabs 动画 - 升级 vite 版本为`v1.0.0.rc6` +- 删除中文路径警告。rc6 已修复 +- 更新部分组件文档 ### 🐛 Bug Fixes diff --git a/build/script/cli.ts b/build/script/cli.ts index c6287283..0ea2f322 100644 --- a/build/script/cli.ts +++ b/build/script/cli.ts @@ -4,7 +4,6 @@ import chalk from 'chalk'; import { argv } from 'yargs'; import { runChangeLog } from './changelog'; -import { runPostInstall } from './postinstall'; import { runPreview } from './preview'; // import { runPreserve } from './preserve'; import { runBuild } from './build'; @@ -27,10 +26,6 @@ switch (task) { // runPreserve(); // break; - case 'postinstall': - runPostInstall(); - break; - case 'preview': runPreview(); break; diff --git a/build/script/postinstall.ts b/build/script/postinstall.ts deleted file mode 100644 index dd02de40..00000000 --- a/build/script/postinstall.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { exec, which } from 'shelljs'; - -function ignoreCaseGit() { - try { - if (which('git').code === 0) { - exec('git config core.ignorecase false '); - } - } catch (error) { - console.log(error); - } -} - -export function runPostInstall() { - ignoreCaseGit(); -} diff --git a/build/script/preserve.ts b/build/script/preserve.ts index fa6a0c69..87e0e674 100644 --- a/build/script/preserve.ts +++ b/build/script/preserve.ts @@ -4,25 +4,29 @@ import path from 'path'; import fs from 'fs-extra'; import { isEqual } from 'lodash'; import { sh } from 'tasksfile'; -import { successConsole, errorConsole } from '../utils'; +import { + successConsole, + // errorConsole +} from '../utils'; const resolve = (dir: string) => { return path.resolve(process.cwd(), dir); }; -const reg = /[\u4E00-\u9FA5\uF900-\uFA2D]/; +// const reg = /[\u4E00-\u9FA5\uF900-\uFA2D]/; let NEED_INSTALL = false; export async function runPreserve() { - const cwdPath = process.cwd(); - if (reg.test(cwdPath)) { - errorConsole( - 'Do not include Chinese, Japanese or Korean in the full path of the project directory, please modify the directory name and run again!' - ); - errorConsole('项目目录全路径请勿包含中文、日文、韩文,请修改目录名后再次重新运行!'); - process.exit(1); - } + // rc.6 fixed + // const cwdPath = process.cwd(); + // if (reg.test(cwdPath)) { + // errorConsole( + // 'Do not include Chinese, Japanese or Korean in the full path of the project directory, please modify the directory name and run again!' + // ); + // errorConsole('项目目录全路径请勿包含中文、日文、韩文,请修改目录名后再次重新运行!'); + // process.exit(1); + // } fs.mkdirp(resolve('build/.cache')); function checkPkgUpdate() { diff --git a/package.json b/package.json index 4feaf169..50be6229 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,6 @@ "@types/nprogress": "^0.2.0", "@types/qrcode": "^1.3.5", "@types/rollup-plugin-visualizer": "^2.6.0", - "@types/shelljs": "^0.8.8", "@types/yargs": "^15.0.9", "@types/zxcvbn": "^4.4.0", "@typescript-eslint/eslint-plugin": "^4.5.0", @@ -84,7 +83,6 @@ "rimraf": "^3.0.2", "rollup-plugin-analyzer": "^3.3.0", "rollup-plugin-visualizer": "^4.1.1", - "shelljs": "^0.8.4", "stylelint": "^13.7.2", "stylelint-config-prettier": "^8.0.2", "stylelint-config-standard": "^20.0.0", diff --git a/src/layouts/default/multitabs/index.less b/src/layouts/default/multitabs/index.less index 59674aab..ca8074e0 100644 --- a/src/layouts/default/multitabs/index.less +++ b/src/layouts/default/multitabs/index.less @@ -76,7 +76,7 @@ color: @white; background: linear-gradient( 118deg, - rgba(@primary-color, 0.7), + rgba(@primary-color, 0.8), rgba(@primary-color, 1) ) !important; border: 0; diff --git a/yarn.lock b/yarn.lock index 4a946dc6..74d54a22 100644 --- a/yarn.lock +++ b/yarn.lock @@ -620,14 +620,6 @@ dependencies: "@types/node" "*" -"@types/glob@*": - version "7.1.3" - resolved "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183" - integrity sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w== - dependencies: - "@types/minimatch" "*" - "@types/node" "*" - "@types/html-minifier@^4.0.0": version "4.0.0" resolved "https://registry.npmjs.org/@types/html-minifier/-/html-minifier-4.0.0.tgz#2065cb9944f2d1b241146707c6935aa7b947d279" @@ -737,11 +729,6 @@ resolved "https://registry.npmjs.org/@types/mime/-/mime-2.0.3.tgz#c893b73721db73699943bfc3653b1deb7faa4a3a" integrity sha512-Jus9s4CDbqwocc5pOAnh8ShfrnMcPHuJYzVcSUU7lrh8Ni5HuIqX3oilL86p3dlTrk0LzHRCgA/GQ7uNCw6l2Q== -"@types/minimatch@*": - version "3.0.3" - resolved "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" - integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== - "@types/minimist@^1.2.0": version "1.2.0" resolved "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" @@ -817,14 +804,6 @@ "@types/express-serve-static-core" "*" "@types/mime" "*" -"@types/shelljs@^0.8.8": - version "0.8.8" - resolved "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.8.8.tgz#e439c69929b88a2c8123c1a55e09eb708315addf" - integrity sha512-lD3LWdg6j8r0VRBFahJVaxoW0SIcswxKaFUrmKl33RJVeeoNYQAz4uqCJ5Z6v4oIBOsC5GozX+I5SorIKiTcQA== - dependencies: - "@types/glob" "*" - "@types/node" "*" - "@types/through@*": version "0.0.30" resolved "https://registry.npmjs.org/@types/through/-/through-0.0.30.tgz#e0e42ce77e897bd6aead6f6ea62aeb135b8a3895" @@ -6049,7 +6028,7 @@ shebang-regex@^3.0.0: resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shelljs@^0.8.3, shelljs@^0.8.4: +shelljs@^0.8.3: version "0.8.4" resolved "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2" integrity sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ== -- GitLab