[gulp] update
This commit is contained in:
34
gulpfile.js
34
gulpfile.js
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
const gulp = require('gulp');
|
||||
const clean = require('gulp-clean');
|
||||
const gulpClean = require('gulp-clean');
|
||||
const Config = require('./config.json');
|
||||
const packageInfo = require('./package.json');
|
||||
const {Sdk, Haxe, Project} = require('gulp-haxetool');
|
||||
@@ -11,28 +11,22 @@ if (Config.SdkDir) {
|
||||
Sdk.dir = Config.SdkDir;
|
||||
}
|
||||
|
||||
exports.clean = () => {
|
||||
return gulp.src('target/*', {read: false}).pipe(clean());
|
||||
exports.clean = function clean() {
|
||||
return gulp.src('target/*', {read: false}).pipe(gulpClean());
|
||||
};
|
||||
|
||||
exports.generate = () => {
|
||||
exports.generate = function generate() {
|
||||
return new Haxe().haxelib([
|
||||
'run', 'protohx', 'generate', 'protohx.json'
|
||||
]);
|
||||
};
|
||||
|
||||
exports.install = () => {
|
||||
exports.install = function install() {
|
||||
return new Haxe().install(packageInfo.haxeDependencies);
|
||||
};
|
||||
|
||||
/**
|
||||
* ToDo:
|
||||
* install before build?
|
||||
* generate before build?
|
||||
* [haxe] generate project.xml | project.hxp (http://www.openfl.org/lime/docs/project-files/hxp-format/)
|
||||
* [haxe] another /tmp/build directories for another builds
|
||||
* debug without sockets?
|
||||
* linux deb package
|
||||
* windows target
|
||||
* window exe package (innosetup)
|
||||
* flash html wrapper
|
||||
@@ -41,7 +35,10 @@ exports.install = () => {
|
||||
const config = new Project.Config({
|
||||
meta: {
|
||||
title: 'Tank\'z',
|
||||
filename: 'tankz',
|
||||
icon: 'resources/images/tank/player/tank_p3_0-0.png',
|
||||
pack: 'ru.m.tankz',
|
||||
author: 'shmyga <shmyga.z@gmail.com>',
|
||||
company: 'MegaLoMania',
|
||||
version: packageInfo.version,
|
||||
},
|
||||
@@ -97,3 +94,18 @@ const server = new Project(
|
||||
main: 'ru.m.tankz.server.Server',
|
||||
})
|
||||
).bind(module, gulp);
|
||||
|
||||
/**
|
||||
* default
|
||||
*/
|
||||
module.exports.default = gulp.series(
|
||||
exports.clean,
|
||||
exports.install,
|
||||
exports.generate,
|
||||
module.exports['client:flash:build'],
|
||||
module.exports['client:html5:build'],
|
||||
module.exports['client:linux:build'],
|
||||
module.exports['server:neko:build'],
|
||||
module.exports['client:flash:pack'],
|
||||
module.exports['client:linux:pack'],
|
||||
);
|
||||
Reference in New Issue
Block a user