add support for optional mods
This commit is contained in:
parent
a74bafd3a1
commit
f4e20ef240
1 changed files with 13 additions and 1 deletions
|
@ -10,8 +10,15 @@ import {
|
|||
export interface Metafile {
|
||||
name: string;
|
||||
filename: string;
|
||||
side: "server" | "client" | "both";
|
||||
side: "server" | "client" | "both" | undefined;
|
||||
provider: UrlProvider;
|
||||
option: Option;
|
||||
}
|
||||
|
||||
export interface Option {
|
||||
optional: boolean;
|
||||
default?: boolean;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -46,6 +53,11 @@ export class IndexFileEntry {
|
|||
filename: parsed.filename,
|
||||
side: parsed.side,
|
||||
provider: this.parseProvider(parsed),
|
||||
option: {
|
||||
optional: parsed.option?.optional || false,
|
||||
default: parsed.option?.default,
|
||||
description: parsed.option?.description,
|
||||
},
|
||||
};
|
||||
|
||||
return metafile;
|
||||
|
|
Loading…
Add table
Reference in a new issue