[build] linux platform
This commit is contained in:
@@ -10,6 +10,8 @@ const version = require('./version');
|
||||
const prepare = require('./prepare');
|
||||
const debug = require('../tasks/debug');
|
||||
const webserver = require('gulp-webserver');
|
||||
const run = require('gulp-run');
|
||||
const tail = require('../tasks/tail');
|
||||
|
||||
|
||||
const generate = () => function generate() {
|
||||
@@ -57,6 +59,7 @@ const webapp = function () {
|
||||
exports['client:flash:html'] = gulp.parallel(flashIndex, flashJs);
|
||||
exports['client:flash'] = gulp.series(prepare(Haxe.ID), generate(), build('flash'), exports['client:flash:html']);
|
||||
exports['client:html5'] = gulp.series(prepare(Haxe.ID), generate(), build('html5'));
|
||||
exports['client:linux'] = gulp.series(prepare(Haxe.ID), generate(), build('linux'));
|
||||
exports['client:webapp'] = webapp;
|
||||
exports['client'] = gulp.series(prepare(Haxe.ID), generate(), gulp.parallel(build('flash'), build('html5')), exports['client:flash:html'], webapp);
|
||||
|
||||
@@ -70,15 +73,32 @@ const testFlash = function() {
|
||||
};
|
||||
|
||||
const testHtml5 = function() {
|
||||
return gulp.series(build('html5'), () => gulp.src('target/html5').pipe(webserver({
|
||||
host: 'localhost', port: 3000,
|
||||
open: true,
|
||||
fallback: 'index.html'
|
||||
})))();
|
||||
return gulp.series(
|
||||
build('html5'),
|
||||
() => gulp.src('target/html5').pipe(webserver({
|
||||
host: 'localhost', port: 3000,
|
||||
open: true,
|
||||
fallback: 'index.html'
|
||||
}))
|
||||
)();
|
||||
};
|
||||
|
||||
const testLinux = function() {
|
||||
const argv = yargs.argv;
|
||||
return gulp.series(
|
||||
build('linux'),
|
||||
() => gulp.src('target/linux/tankz')
|
||||
.pipe(run('./tankz', {cwd: 'target/linux', verbosity: 1}))
|
||||
.pipe(tail(debug.log))
|
||||
.pipe(gulp.dest('target/log'))
|
||||
)();
|
||||
};
|
||||
|
||||
|
||||
|
||||
exports['client:flash:test'] = gulp.series(prepare(Haxe.ID, FlashPlayer.ID), testFlash);
|
||||
exports['client:html5:test'] = gulp.series(prepare(Haxe.ID), testHtml5);
|
||||
exports['client:linux:test'] = gulp.series(prepare(Haxe.ID), testLinux);
|
||||
exports['client:test'] = exports['client:flash:test'];
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user