Skip to content

Commit

Permalink
feat(modkit-shared)!: 允许额外配置
Browse files Browse the repository at this point in the history
Update metadata.ts
Update script.ts
  • Loading branch information
VirgilClyne committed Oct 22, 2024
1 parent 48ce772 commit 18387b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/modkit/shared/src/types/source/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ export interface ModuleMetadata {
* 模块名称
* @default 读取 package.json 中的 displayName
*/
name?: string;
name: string;
/**
* 模块描述
* @default 读取 package.json 中的 description
*/
description?: string;
description: string;
/**
* 版本号
* @default 默认读取 package.json 中的 version
Expand All @@ -21,7 +21,5 @@ export interface ModuleMetadata {
/**
* 额外的配置
*/
extra?: {
[key: string]: string | string[];
};
[key: string]: string | string[] | number | boolean | undefined;
}
4 changes: 4 additions & 0 deletions packages/modkit/shared/src/types/source/script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,8 @@ export interface ModuleScript {
* @default dev 环境下为 true,其他环境下为 false
*/
debug?: boolean;
/**
* 额外的配置
*/
[key: string]: string | number | boolean | undefined;
}

0 comments on commit 18387b6

Please sign in to comment.