@@ -1,3 +1,4 @@
|
||||
node_modules/
|
||||
target/
|
||||
dist/
|
||||
build/
|
||||
@@ -1,71 +0,0 @@
|
||||
const gulp = require('gulp');
|
||||
const gulpClean = require('gulp-clean');
|
||||
const packageInfo = require('./package.json');
|
||||
const {System, Sdk, Haxe, Project} = require('gulp-haxetool');
|
||||
|
||||
//Sdk.dir = '/opt/sdk';
|
||||
|
||||
exports.clean = function clean() {
|
||||
return gulp.src('target/*', {read: false}).pipe(gulpClean());
|
||||
};
|
||||
|
||||
exports.install = function install() {
|
||||
const haxe = new Haxe();
|
||||
return haxe.prepare().then(() => haxe.install(packageInfo.haxeDependencies));
|
||||
};
|
||||
|
||||
const config = new Project.Config({
|
||||
meta: {
|
||||
title: 'Application',
|
||||
filename: 'app',
|
||||
icon: './resources/icon.jpg',
|
||||
pack: 'com.example',
|
||||
author: 'Anonim <anonim@anonim.com>',
|
||||
company: 'Any company',
|
||||
version: packageInfo.version,
|
||||
},
|
||||
name: 'app',
|
||||
libs: packageInfo.haxeDependencies,
|
||||
sources: ['src'],
|
||||
assets: ['resources'],
|
||||
main: 'Main',
|
||||
});
|
||||
|
||||
const project = new Project(
|
||||
Project.BuildSystem.OPENFL,
|
||||
[
|
||||
Project.Platform.FLASH,
|
||||
Project.Platform.HTML5,
|
||||
Project.Platform.LINUX,
|
||||
Project.Platform.WINDOWS,
|
||||
],
|
||||
config
|
||||
).bind(module);
|
||||
|
||||
|
||||
const defaultSeries = [
|
||||
exports.clean,
|
||||
module.exports['app:flash:build'],
|
||||
module.exports['app:flash:html'],
|
||||
module.exports['app:html5:build'],
|
||||
];
|
||||
|
||||
if (System.isLinux) {
|
||||
defaultSeries.push(
|
||||
module.exports['app:linux:build'],
|
||||
module.exports['app:linux:archive'],
|
||||
module.exports['app:linux:deb'],
|
||||
|
||||
module.exports['app:android:build'],
|
||||
);
|
||||
}
|
||||
|
||||
if (System.isWindows) {
|
||||
defaultSeries.push(
|
||||
module.exports['app:windows:build'],
|
||||
module.exports['app:windows:archive'],
|
||||
module.exports['app:windows:installer'],
|
||||
);
|
||||
}
|
||||
|
||||
module.exports.default = gulp.series(defaultSeries);
|
||||
@@ -0,0 +1,7 @@
|
||||
import gulp from "gulp";
|
||||
import { Preset } from "gulp-haxetool";
|
||||
import presetData from "./haxetool.json" with { type: "json" };
|
||||
import packageInfo from "./package.json" with { type: "json" };
|
||||
|
||||
const preset = new Preset(presetData, null, packageInfo);
|
||||
export default preset.register(gulp);
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"app": {
|
||||
"buildSystem": "openfl",
|
||||
"platforms": ["flash", "html5", "linux", "windows", "android"],
|
||||
"config": {
|
||||
"meta": {
|
||||
"title": "Example",
|
||||
"filename": "example",
|
||||
"icon": "./resources/icon.jpg",
|
||||
"pack": "com.example",
|
||||
"author": "Anonim <anonim@anonim.com>",
|
||||
"company": "Any company",
|
||||
"version": "<%=package.version%>"
|
||||
},
|
||||
"sources": ["src"],
|
||||
"main": "Main"
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+7098
File diff suppressed because it is too large
Load Diff
+17
-12
@@ -1,14 +1,19 @@
|
||||
{
|
||||
"name": "app",
|
||||
"version": "0.0.1",
|
||||
"devDependencies": {
|
||||
"gulp": "^4.0.0",
|
||||
"gulp-clean": "^0.4.0",
|
||||
"gulp-haxetool": "^0.1.0"
|
||||
},
|
||||
"haxeDependencies": {
|
||||
"lime": "7.6.0",
|
||||
"openfl": "8.9.2",
|
||||
"hxcpp": "4.0.19"
|
||||
}
|
||||
"name": "example",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
"build": "gulp",
|
||||
"dev": "gulp app:flash:test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp-cli": "^3.1.0",
|
||||
"gulp-haxetool": "^1.2.0"
|
||||
},
|
||||
"haxeDependencies": {
|
||||
"lime": "8.0.0",
|
||||
"openfl": "9.2.0",
|
||||
"hxcpp": "4.2.1"
|
||||
},
|
||||
"haxe": "4.2.5"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user