[gulp] update to gulp-haxetool 0.0.4
This commit is contained in:
@@ -23,23 +23,31 @@ const Platform = {
|
|||||||
|
|
||||||
class Config {
|
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.name = name;
|
||||||
this.version = version;
|
this.version = version;
|
||||||
this.lib = lib;
|
this.lib = lib;
|
||||||
this.cp = cp;
|
this.cp = cp;
|
||||||
|
this.asset = asset;
|
||||||
this.main = main;
|
this.main = main;
|
||||||
this.values = values;
|
this.values = values;
|
||||||
this.macro = macro;
|
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({
|
return new Config({
|
||||||
|
title: this.title,
|
||||||
|
pack: this.pack,
|
||||||
|
company: this.company,
|
||||||
name: name || this.name,
|
name: name || this.name,
|
||||||
version: version || this.version,
|
version: version || this.version,
|
||||||
//lib: this.lib.concat(lib), //ToDo: check if object
|
//lib: this.lib.concat(lib), //ToDo: check if object
|
||||||
lib: this.lib,
|
lib: this.lib,
|
||||||
cp: this.cp.concat(cp),
|
cp: this.cp.concat(cp),
|
||||||
|
asset: this.asset.concat(asset),
|
||||||
main: main || this.main,
|
main: main || this.main,
|
||||||
values: {...this.values, ...values},
|
values: {...this.values, ...values},
|
||||||
macro: this.macro.concat(macro),
|
macro: this.macro.concat(macro),
|
||||||
@@ -96,9 +104,13 @@ class OpenFLBuilder extends Builder {
|
|||||||
.pipe(this.haxe.openfl({
|
.pipe(this.haxe.openfl({
|
||||||
command: 'build',
|
command: 'build',
|
||||||
platform: this.platform,
|
platform: this.platform,
|
||||||
|
title: this.config.title,
|
||||||
|
pack: this.config.pack,
|
||||||
|
company: this.config.company,
|
||||||
version: this.config.version,
|
version: this.config.version,
|
||||||
lib: this.config.lib,
|
lib: this.config.lib,
|
||||||
cp: this.config.cp,
|
cp: this.config.cp,
|
||||||
|
asset: this.config.asset,
|
||||||
main: this.config.main,
|
main: this.config.main,
|
||||||
debug: debug,
|
debug: debug,
|
||||||
values: this.config.values,
|
values: this.config.values,
|
||||||
|
|||||||
@@ -41,6 +41,9 @@ exports.install = () => {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const config = new Project.Config({
|
const config = new Project.Config({
|
||||||
|
title: 'Tank\'z',
|
||||||
|
pack: 'ru.m.tankz',
|
||||||
|
company: 'MegaLoMania',
|
||||||
version: version,
|
version: version,
|
||||||
lib: packageInfo.haxeDependencies,
|
lib: packageInfo.haxeDependencies,
|
||||||
cp: [
|
cp: [
|
||||||
@@ -58,6 +61,7 @@ const config = new Project.Config({
|
|||||||
const client = new Project(config.update({
|
const client = new Project(config.update({
|
||||||
name: 'client',
|
name: 'client',
|
||||||
cp: ['src/client/haxe'],
|
cp: ['src/client/haxe'],
|
||||||
|
asset: ['src/client/resources'],
|
||||||
main: 'ru.m.tankz.Client',
|
main: 'ru.m.tankz.Client',
|
||||||
}), [
|
}), [
|
||||||
Project.Platform.FLASH,
|
Project.Platform.FLASH,
|
||||||
@@ -71,6 +75,7 @@ const client = new Project(config.update({
|
|||||||
const editor = new Project(config.update({
|
const editor = new Project(config.update({
|
||||||
name: 'editor',
|
name: 'editor',
|
||||||
cp: ['src/client/haxe', 'src/editor/haxe'],
|
cp: ['src/client/haxe', 'src/editor/haxe'],
|
||||||
|
asset: ['src/client/resources'],
|
||||||
main: 'ru.m.tankz.editor.Editor',
|
main: 'ru.m.tankz.editor.Editor',
|
||||||
}), [
|
}), [
|
||||||
Project.Platform.FLASH,
|
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