8 Commits

Author SHA1 Message Date
6cd51b58c7 [core] add meta.fps param 2019-05-20 15:37:26 +03:00
a510dffb33 [template] mp3 assets for flash else ogg 2019-04-23 17:38:17 +03:00
7dbdf21081 up version 2019-03-28 14:59:11 +03:00
ae317f8f1a Merge branch 'master' of bitbucket.org:shmyga/gulp-haxetool 2019-03-28 14:58:41 +03:00
c108fcc181 [core] add openfl preloader param 2019-03-28 14:58:31 +03:00
39163dadde up version 2019-03-14 21:16:59 +03:00
5b948e30d2 Merge branch 'master' of bitbucket.org:shmyga/gulp-haxetool 2019-03-14 21:15:59 +03:00
19ebf337fb add width and height meta params 2019-03-13 14:18:52 +03:00
4 changed files with 20 additions and 9 deletions

View File

@@ -1,3 +1,8 @@
0.0.18
------
* Add meta.fps project param
0.0.12 0.0.12
------ ------

View File

@@ -25,6 +25,7 @@ class Config {
this._params = []; this._params = [];
this.name = null; this.name = null;
this.main = null; this.main = null;
this.preloader = null;
this.sources = []; this.sources = [];
this.assets = []; this.assets = [];
this.libs = []; this.libs = [];
@@ -38,7 +39,10 @@ class Config {
version: null, version: null,
pack: null, pack: null,
author: null, author: null,
company: null company: null,
width: 800,
height: 600,
fps: 60,
}; };
if (params) { if (params) {
this.update(params); this.update(params);
@@ -54,6 +58,7 @@ class Config {
this._params.push(params); this._params.push(params);
if (params.name !== undefined) this.name = params.name; if (params.name !== undefined) this.name = params.name;
if (params.main !== undefined) this.main = params.main; if (params.main !== undefined) this.main = params.main;
if (params.preloader !== undefined) this.preloader = params.preloader;
if (params.sources !== undefined) this.sources = this.sources.concat(params.sources.map(Config.absolutePath)); if (params.sources !== undefined) this.sources = this.sources.concat(params.sources.map(Config.absolutePath));
if (params.assets !== undefined) this.assets = this.assets.concat(params.assets.map(Config.absolutePath)); if (params.assets !== undefined) this.assets = this.assets.concat(params.assets.map(Config.absolutePath));
if (params.libs !== undefined) this.libs = this.libs.concat(Array.isArray(params.libs) ? params.libs : Object.entries(params.libs).map(([k, v]) => ({name: k, version: v}))); if (params.libs !== undefined) this.libs = this.libs.concat(Array.isArray(params.libs) ? params.libs : Object.entries(params.libs).map(([k, v]) => ({name: k, version: v})));

View File

@@ -1,6 +1,6 @@
{ {
"name": "gulp-haxetool", "name": "gulp-haxetool",
"version": "0.0.15", "version": "0.0.19",
"description": "HaXe Tool for Gulp", "description": "HaXe Tool for Gulp",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {

View File

@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<project> <project>
<meta title="<%=meta.title%>" package="<%=meta.pack%>" version="<%=meta.version%>" company="<%=meta.company%>"/> <meta title="<%=meta.title%>" package="<%=meta.pack%>" version="<%=meta.version%>" company="<%=meta.company%>"/>
<app main="<%=main%>" path="<%=buildDir%>" file="<%=meta.filename%>"/> <app main="<%=main%>" path="<%=buildDir%>" file="<%=meta.filename%>" preloader="<%=preloader%>"/>
<icon path="<%=icon%>"/> <icon path="<%=icon%>"/>
<% sources.forEach(function(item) { %> <% sources.forEach(function(item) { %>
<source path="<%=item%>"/><% }); %> <source path="<%=item%>"/><% }); %>
<% assets.forEach(function(item) { %> <% assets.forEach(function(item) { %>
<assets path="<%=item%>" rename="<%=item.split('/').pop()%>" include="*"/><% }); %> <assets if="flash" path="<%=item%>" rename="<%=item.split('/').pop()%>" include="*" exclude="*.ogg"/>
<assets unless="flash" path="<%=item%>" rename="<%=item.split('/').pop()%>" include="*" exclude="*.mp3"/><% }); %>
<% libs.forEach(function(item) { %> <% libs.forEach(function(item) { %>
<haxelib name="<%=item.name%>" version="<%=item.version.split('@').shift()%>"/><% }); %> <haxelib name="<%=item.name%>" version="<%=item.version.split('@').shift()%>"/><% }); %>
<% macros.forEach(function(item) { %> <% macros.forEach(function(item) { %>
@@ -14,8 +15,8 @@
<% flags.forEach(function(item) { %> <% flags.forEach(function(item) { %>
<haxeflag name="-D" value="<%=item%>"/><% }); %> <haxeflag name="-D" value="<%=item%>"/><% }); %>
<window fps="30"/> <window fps="<%=meta.fps%>"/>
<window width="1024" height="768" unless="html5"/> <window fps="<%=meta.fps%>" width="<%=meta.width%>" height="<%=meta.height%>" unless="html5"/>
<haxeflag name="-D" value="swf-gpu"/> <haxeflag name="-D" value="swf-gpu"/>
<haxeflag name="-D" value="native-trace"/> <haxeflag name="-D" value="native-trace"/>