@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user