feat(cli): 支持配置temp文件夹,默认.tmagic

This commit is contained in:
roymondchen 2022-08-03 19:01:14 +08:00 committed by jia000
parent 55661ee2e7
commit 624da4c29a
3 changed files with 3 additions and 2 deletions

View File

@ -7,4 +7,5 @@ cli({
packages: {}, packages: {},
componentFileAffix: '', componentFileAffix: '',
cleanTemp: true, cleanTemp: true,
temp: '.tmagic',
}); });

View File

@ -19,7 +19,7 @@ export default class Core {
}; };
public dir = { public dir = {
temp: () => path.resolve(this.options.source, 'src/.tmagic'), temp: () => path.resolve(this.options.source, this.options.temp),
}; };
constructor(options: UserConfig) { constructor(options: UserConfig) {

View File

@ -33,7 +33,7 @@ export interface EntryFile {
export interface UserConfig { export interface UserConfig {
source: string; source: string;
scripts: Record<string, string>; temp: string;
packages: Record<string, any>; packages: Record<string, any>;
componentFileAffix: string; componentFileAffix: string;
cleanTemp: boolean; cleanTemp: boolean;