mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
feat(cli): 支持temp下的config.ts配置文件,该模式下的配置文件会默认被删掉
This commit is contained in:
parent
4f8ea94ee8
commit
52973d2a34
@ -14,9 +14,12 @@ export const scripts = (defaultAppConfig: UserConfig) => {
|
||||
|
||||
// resolve user config file
|
||||
const userConfigPath = [
|
||||
path.resolve(process.cwd(), 'tmagic.config.ts'),
|
||||
path.resolve(process.cwd(), 'tmagic.config.js'),
|
||||
path.resolve(process.cwd(), 'tmagic.config.cjs'),
|
||||
path.resolve(defaultAppConfig.source, 'tmagic.config.ts'),
|
||||
path.resolve(defaultAppConfig.source, 'tmagic.config.js'),
|
||||
path.resolve(defaultAppConfig.source, 'tmagic.config.cjs'),
|
||||
path.resolve(defaultAppConfig.temp, 'config.ts'),
|
||||
path.resolve(defaultAppConfig.temp, 'config.js'),
|
||||
path.resolve(defaultAppConfig.temp, 'config.cjs'),
|
||||
].find((item) => fs.pathExistsSync(item));
|
||||
|
||||
const userConfig = await loadUserConfig(userConfigPath);
|
||||
|
Loading…
x
Reference in New Issue
Block a user