This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import dateformat from "dateformat";
|
||||
import gulp from "gulp";
|
||||
import gulpClean from "gulp-clean";
|
||||
import template from "lodash.template";
|
||||
import os from "os";
|
||||
import type { Task } from "undertaker";
|
||||
import { Builder, Project } from ".";
|
||||
import { System } from "../common/system";
|
||||
import { Config, type ConfigParams } from "../core/config";
|
||||
import template from "../common/template";
|
||||
import { Config, type ConfigParams, type SignKey } from "../core/config";
|
||||
import { Sdk } from "../core/sdk";
|
||||
import { Platform } from "../core/type";
|
||||
import { Haxe } from "../impl/haxe";
|
||||
@@ -16,7 +16,7 @@ export interface PresetConfig {
|
||||
BuildDir?: string;
|
||||
Develop?: boolean;
|
||||
UseRuffle?: boolean;
|
||||
Key?: any;
|
||||
Key?: SignKey;
|
||||
}
|
||||
|
||||
export const DEFAULT_CONFIG: PresetConfig = {
|
||||
@@ -44,9 +44,13 @@ export class Preset {
|
||||
}
|
||||
|
||||
private fillPreset(preset: ProjectPreset): ProjectPreset {
|
||||
const configTemplate = template(JSON.stringify(preset));
|
||||
return JSON.parse(
|
||||
configTemplate({ config: this.config, package: this.packageInfo, env: process.env, dateformat: dateformat }),
|
||||
template.renderString(JSON.stringify(preset), {
|
||||
config: this.config,
|
||||
package: this.packageInfo,
|
||||
env: process.env,
|
||||
dateformat: dateformat,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user