[gulp] update to gulp-haxetool 0.0.4
This commit is contained in:
@@ -23,23 +23,31 @@ const Platform = {
|
||||
|
||||
class Config {
|
||||
|
||||
constructor({name, version, lib=[], cp=[], main=null, values={}, macro=[]}) {
|
||||
constructor({title, pack, company, name, version, lib=[], cp=[], asset=[], main=null, values={}, macro=[]}) {
|
||||
this.title = title;
|
||||
this.pack = pack;
|
||||
this.company = company;
|
||||
this.name = name;
|
||||
this.version = version;
|
||||
this.lib = lib;
|
||||
this.cp = cp;
|
||||
this.asset = asset;
|
||||
this.main = main;
|
||||
this.values = values;
|
||||
this.macro = macro;
|
||||
}
|
||||
|
||||
update({name, version, lib=[], cp=[], main=null, values={}, macro=[]}) {
|
||||
update({name, version, lib=[], cp=[], asset=[], main=null, values={}, macro=[]}) {
|
||||
return new Config({
|
||||
title: this.title,
|
||||
pack: this.pack,
|
||||
company: this.company,
|
||||
name: name || this.name,
|
||||
version: version || this.version,
|
||||
//lib: this.lib.concat(lib), //ToDo: check if object
|
||||
lib: this.lib,
|
||||
cp: this.cp.concat(cp),
|
||||
asset: this.asset.concat(asset),
|
||||
main: main || this.main,
|
||||
values: {...this.values, ...values},
|
||||
macro: this.macro.concat(macro),
|
||||
@@ -96,9 +104,13 @@ class OpenFLBuilder extends Builder {
|
||||
.pipe(this.haxe.openfl({
|
||||
command: 'build',
|
||||
platform: this.platform,
|
||||
title: this.config.title,
|
||||
pack: this.config.pack,
|
||||
company: this.config.company,
|
||||
version: this.config.version,
|
||||
lib: this.config.lib,
|
||||
cp: this.config.cp,
|
||||
asset: this.config.asset,
|
||||
main: this.config.main,
|
||||
debug: debug,
|
||||
values: this.config.values,
|
||||
|
||||
@@ -41,6 +41,9 @@ exports.install = () => {
|
||||
*/
|
||||
|
||||
const config = new Project.Config({
|
||||
title: 'Tank\'z',
|
||||
pack: 'ru.m.tankz',
|
||||
company: 'MegaLoMania',
|
||||
version: version,
|
||||
lib: packageInfo.haxeDependencies,
|
||||
cp: [
|
||||
@@ -58,6 +61,7 @@ const config = new Project.Config({
|
||||
const client = new Project(config.update({
|
||||
name: 'client',
|
||||
cp: ['src/client/haxe'],
|
||||
asset: ['src/client/resources'],
|
||||
main: 'ru.m.tankz.Client',
|
||||
}), [
|
||||
Project.Platform.FLASH,
|
||||
@@ -71,6 +75,7 @@ const client = new Project(config.update({
|
||||
const editor = new Project(config.update({
|
||||
name: 'editor',
|
||||
cp: ['src/client/haxe', 'src/editor/haxe'],
|
||||
asset: ['src/client/resources'],
|
||||
main: 'ru.m.tankz.editor.Editor',
|
||||
}), [
|
||||
Project.Platform.FLASH,
|
||||
|
||||
12
project.xml
12
project.xml
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<meta title="Tank'z" package="ru.m.tankz" company="MegaLoMania"/>
|
||||
<source path="src/common/haxe"/><!-- for html5 -->
|
||||
<assets path="src/client/resources" rename="resources" include="*"/><!-- ? -->
|
||||
<haxelib name="openfl"/><!-- for flash -->
|
||||
<window fps="30"/>
|
||||
<window width="1024" height="768" unless="html5"/>
|
||||
<haxeflag name="-D" value="swf-gpu"/>
|
||||
<haxeflag name="-D" value="native-trace"/>
|
||||
<haxeflag name="-dce" value="no"/>
|
||||
</project>
|
||||
Reference in New Issue
Block a user