mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-26 08:36:19 +08:00
chore: remove Chinese path warning
This commit is contained in:
@@ -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;
|
||||
|
@@ -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();
|
||||
}
|
@@ -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() {
|
||||
|
Reference in New Issue
Block a user