feat(project): add preset

This commit is contained in:
2026-10-14 15:53:44 +03:00
parent 78804036ab
commit dba24a2c68
27 changed files with 934 additions and 530 deletions
+21
View File
@@ -0,0 +1,21 @@
import type { Config } from "../../core/config";
import { Target } from "./target";
export type PackerFactory = new (config: Config) => Packer;
export class Packer extends Target {
static factory: Record<string, Record<string, PackerFactory>> = {};
call() {
throw "Not Implemented";
}
static register(platform: string, name: string, packer: PackerFactory) {
if (!Packer.factory[platform]) Packer.factory[platform] = {};
Packer.factory[platform][name] = packer;
}
static new(config: Config, platform: string, name: string): Packer {
return new Packer.factory[platform][name](config);
}
}