added readme and example
This commit is contained in:
52
example/gulpfile.js
Normal file
52
example/gulpfile.js
Normal file
@@ -0,0 +1,52 @@
|
||||
const gulp = require('gulp');
|
||||
const gulpClean = require('gulp-clean');
|
||||
const packageInfo = require('./package.json');
|
||||
const {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,
|
||||
],
|
||||
config
|
||||
).bind(module, gulp);
|
||||
|
||||
module.exports.default = gulp.series(
|
||||
exports.clean,
|
||||
exports.install,
|
||||
module.exports['app:flash:build'],
|
||||
module.exports['app:html5:build'],
|
||||
module.exports['app:linux:build'],
|
||||
module.exports['app:flash:pack'],
|
||||
module.exports['app:linux:pack'],
|
||||
);
|
||||
Reference in New Issue
Block a user