[gulp] move project to gulp-haxetool
This commit is contained in:
73
gulpfile.js
73
gulpfile.js
@@ -2,10 +2,9 @@
|
||||
const gulp = require('gulp');
|
||||
const clean = require('gulp-clean');
|
||||
const Config = require('./config.json');
|
||||
const Project = require('./build/project');
|
||||
const version = require('./build/version');
|
||||
const packageInfo = require('./package.json');
|
||||
const {Sdk, Haxe} = require('gulp-haxetool');
|
||||
const {Sdk, Haxe, Project} = require('gulp-haxetool');
|
||||
const dateformat = require('dateformat');
|
||||
|
||||
|
||||
@@ -41,12 +40,14 @@ exports.install = () => {
|
||||
*/
|
||||
|
||||
const config = new Project.Config({
|
||||
title: 'Tank\'z',
|
||||
pack: 'ru.m.tankz',
|
||||
company: 'MegaLoMania',
|
||||
version: version,
|
||||
lib: packageInfo.haxeDependencies,
|
||||
cp: [
|
||||
meta: {
|
||||
title: 'Tank\'z',
|
||||
pack: 'ru.m.tankz',
|
||||
company: 'MegaLoMania',
|
||||
version: version,
|
||||
},
|
||||
libs: packageInfo.haxeDependencies,
|
||||
sources: [
|
||||
'src/common/haxe',
|
||||
'src-gen/haxe',
|
||||
],
|
||||
@@ -58,36 +59,42 @@ const config = new Project.Config({
|
||||
/**
|
||||
* client
|
||||
*/
|
||||
const client = new Project(config.update({
|
||||
name: 'client',
|
||||
cp: ['src/client/haxe'],
|
||||
asset: ['src/client/resources'],
|
||||
main: 'ru.m.tankz.Client',
|
||||
}), [
|
||||
Project.Platform.FLASH,
|
||||
Project.Platform.HTML5,
|
||||
Project.Platform.LINUX,
|
||||
]).bind(module);
|
||||
const client = new Project(
|
||||
Project.BuildSystem.OPENFL,[
|
||||
Project.Platform.FLASH,
|
||||
Project.Platform.HTML5,
|
||||
Project.Platform.LINUX,
|
||||
], config.branch({
|
||||
name: 'client',
|
||||
sources: ['src/client/haxe'],
|
||||
assets: ['src/client/resources'],
|
||||
main: 'ru.m.tankz.Client',
|
||||
})
|
||||
).bind(module, gulp);
|
||||
|
||||
/**
|
||||
* editor
|
||||
*/
|
||||
const editor = new Project(config.update({
|
||||
name: 'editor',
|
||||
cp: ['src/client/haxe', 'src/editor/haxe'],
|
||||
asset: ['src/client/resources'],
|
||||
main: 'ru.m.tankz.editor.Editor',
|
||||
}), [
|
||||
Project.Platform.FLASH,
|
||||
]).bind(module);
|
||||
const editor = new Project(
|
||||
Project.BuildSystem.OPENFL, [
|
||||
Project.Platform.FLASH
|
||||
], config.branch({
|
||||
name: 'editor',
|
||||
sources: ['src/client/haxe', 'src/editor/haxe'],
|
||||
assets: ['src/client/resources'],
|
||||
main: 'ru.m.tankz.editor.Editor',
|
||||
})
|
||||
).bind(module, gulp);
|
||||
|
||||
/**
|
||||
* server
|
||||
*/
|
||||
const server = new Project(config.update({
|
||||
name: 'server',
|
||||
cp: ['src/server/haxe'],
|
||||
main: 'ru.m.tankz.server.Server',
|
||||
}), [
|
||||
Project.Platform.NEKO,
|
||||
]).bind(module);
|
||||
const server = new Project(
|
||||
Project.BuildSystem.HAXE, [
|
||||
Project.Platform.NEKO
|
||||
], config.branch({
|
||||
name: 'server',
|
||||
sources: ['src/server/haxe'],
|
||||
main: 'ru.m.tankz.server.Server',
|
||||
})
|
||||
).bind(module, gulp);
|
||||
|
||||
Reference in New Issue
Block a user