mirror of
https://github.com/whyour/qinglong.git
synced 2026-06-30 20:35:09 +08:00
升级umi4.0,修复新建脚本
This commit is contained in:
+5
-2
@@ -115,8 +115,11 @@ export default (app: Router) => {
|
||||
if (!originFilename) {
|
||||
originFilename = filename;
|
||||
}
|
||||
const originFilePath = `${path}${originFilename.replace(/\//g, '')}`;
|
||||
const filePath = `${path}${filename.replace(/\//g, '')}`;
|
||||
const originFilePath = join(
|
||||
path,
|
||||
`${originFilename.replace(/\//g, '')}`,
|
||||
);
|
||||
const filePath = join(path, `${filename.replace(/\//g, '')}`);
|
||||
if (fs.existsSync(originFilePath)) {
|
||||
fs.copyFileSync(
|
||||
originFilePath,
|
||||
|
||||
@@ -13,7 +13,7 @@ export default async () => {
|
||||
|
||||
// 生成内置token
|
||||
let tokenCommand = `ts-node-transpile-only ${config.rootPath}/back/token.ts`;
|
||||
const tokenFile = `${config.rootPath}/static/build/token.js`;
|
||||
const tokenFile = `${config.rootPath}static/build/token.js`;
|
||||
if (await fileExist(tokenFile)) {
|
||||
tokenCommand = `node ${tokenFile}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user