feat: add task module
test / test (push) Successful in 2m13s

This commit is contained in:
2026-11-11 21:34:11 +03:00
parent 0a355ee680
commit 6940c65b88
34 changed files with 278 additions and 234 deletions
+4 -3
View File
@@ -4,9 +4,9 @@ import os from "os";
import path from "path";
import template from "../common/template";
import { Sdk } from "../core/sdk";
import type { ConfigJson, ConfigSource, PackageJson, PresetJson } from "../core/type";
import { Platform, type ConfigJson, type ConfigSource, type PackageJson, type PresetJson } from "../core/type";
import { Haxe } from "../impl/haxe";
import { Project } from "../project";
import { RuffleRunner, Runner } from "../project";
export const DEFAULT_CONFIG_JSON: ConfigJson = {
SdkDir: "$HOME/sdk",
@@ -15,8 +15,9 @@ export const DEFAULT_CONFIG_JSON: ConfigJson = {
export const resolvePath = (path: string) => path.replace("$HOME", os.homedir());
export const applyConfig = (config: ConfigJson) => {
// TODO: ruffle kludge
if (config.UseRuffle) {
Project.useRuffle();
Runner.register(Platform.FLASH, RuffleRunner);
}
if (config.SdkDir) {
Sdk.dir = resolvePath(config.SdkDir);