mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-04 12:25:19 -04:00
24 lines
526 B
TypeScript
24 lines
526 B
TypeScript
const targets = new Array();
|
|
export function CliFunction(key: string, description: string) {
|
|
return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) {
|
|
targets.push({
|
|
target,
|
|
propertyKey,
|
|
descriptor,
|
|
key,
|
|
description,
|
|
});
|
|
};
|
|
}
|
|
export function GetCliFunctions(key) {
|
|
return targets.find((x) => x.key === key);
|
|
}
|
|
export function GetAllCliModes() {
|
|
return targets.map((x) => {
|
|
return {
|
|
key: x.key,
|
|
description: x.description,
|
|
};
|
|
});
|
|
}
|