This commit is contained in:
@@ -15,11 +15,11 @@ export class Project {
|
||||
static Platform = Platform;
|
||||
static Builder = Builder;
|
||||
|
||||
public buildSystem: string;
|
||||
public platforms: string[];
|
||||
public buildSystem: BuildSystem;
|
||||
public platforms: Platform[];
|
||||
public config: Config;
|
||||
|
||||
constructor(buildSystem: string, platforms: string[] | string, config: Config) {
|
||||
constructor(buildSystem: BuildSystem, platforms: Platform[] | Platform, config: Config) {
|
||||
this.buildSystem = buildSystem;
|
||||
this.platforms = Array.isArray(platforms) ? platforms : [platforms];
|
||||
this.config = config;
|
||||
@@ -34,23 +34,23 @@ export class Project {
|
||||
return false;
|
||||
}
|
||||
|
||||
build(platform: string, debug: boolean = false): Task[] {
|
||||
build(platform: Platform, debug: boolean = false): Task[] {
|
||||
const builder = Builder.new(this.config, platform, this.buildSystem, debug);
|
||||
const tasks: Task[] = [builder.prepare.bind(builder)];
|
||||
tasks.push(builder.call.bind(builder));
|
||||
return tasks;
|
||||
}
|
||||
|
||||
run(platform: string, debug: boolean = false): Task[] {
|
||||
run(platform: Platform, debug: boolean = false): Task[] {
|
||||
const runner = Runner.new(this.config, platform, debug);
|
||||
return [runner.prepare.bind(runner), runner.call.bind(runner)];
|
||||
}
|
||||
|
||||
test(platform: string, debug: boolean = true): Task[] {
|
||||
test(platform: Platform, debug: boolean = true): Task[] {
|
||||
return this.build(platform, debug).concat(this.run(platform, debug));
|
||||
}
|
||||
|
||||
pack(platform: string, name: string) {
|
||||
pack(platform: Platform, name: string) {
|
||||
const packer = Packer.new(this.config, platform, name);
|
||||
return [packer.prepare.bind(packer), packer.call.bind(packer)];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user