Skip to content

Commit

Permalink
feat(cli): 支持配置temp文件夹,默认.tmagic
Browse files Browse the repository at this point in the history
  • Loading branch information
roymondchen authored and jia000 committed Aug 4, 2022
1 parent 55661ee commit 624da4c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/cli/bin/tmagic.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ cli({
packages: {},
componentFileAffix: '',
cleanTemp: true,
temp: '.tmagic',
});
2 changes: 1 addition & 1 deletion packages/cli/src/Core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default class Core {
};

public dir = {
temp: () => path.resolve(this.options.source, 'src/.tmagic'),
temp: () => path.resolve(this.options.source, this.options.temp),
};

constructor(options: UserConfig) {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface EntryFile {

export interface UserConfig {
source: string;
scripts: Record<string, string>;
temp: string;
packages: Record<string, any>;
componentFileAffix: string;
cleanTemp: boolean;
Expand Down

0 comments on commit 624da4c

Please sign in to comment.