forked from vujadin/BabylonHx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
73 lines (60 loc) · 2.08 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
'use strict';
var path = require("path");
var gulp = require("gulp");
var runSequence = require('run-sequence');
var shell = require('gulp-shell');
var connect = require('gulp-connect');
var open = require('open');
gulp.task('connect', function() {
console.log('Starting BabylonHX');
connect.server({
root: ['bin_lime/html5/bin/'],
port: 3000,
livereload: true
});
open('http://localhost:3000');
});
gulp.task('restart', function() {
console.log('reload BabylonHX');
connect.reload();
});
var paths = {
main: ["**/**.hx"]
};
gulp.task('default', function (callback) {
gulp.start('connect');
gulp.start('watch');
});
gulp.task('watch', function (callback) {
gulp.watch(paths.main, ['buildpureJS', 'buildlime', 'restart']);
});
gulp.task('test', shell.task([
'haxe compile.hxml'
]));
gulp.task('buildlime', shell.task([
'lime build html5 -Dwebgl'
]));
gulp.task('buildpureJS', shell.task([
'haxe build_js.hxml'
]));
gulp.task('install_dep', shell.task([
'sudo haxelib -notimeout install lime',
'sudo haxelib -notimeout install dox',
'sudo haxelib -notimeout install openfl',
'sudo haxelib -notimeout install swf',
'sudo haxelib -notimeout install svg',
'sudo haxelib -notimeout install actuate',
'sudo haxelib -notimeout install flixel',
'sudo haxelib -notimeout install kha',
'sudo haxelib -notimeout git cannonhx https://github.com/vujadin/cannon.hx.git',
'sudo haxelib -notimeout git babylonhxext https://github.com/vujadin/BabylonHx_Extensions.git',
'sudo haxelib -notimeout git catamaranhx https://github.com/catamaranHX/catamaranHX_lib.git',
'sudo haxelib -notimeout git snow https://github.com/underscorediscovery/snow.git',
'sudo haxelib -notimeout git oimohx https://github.com/babylonhx/OimoHx.git',
'sudo haxelib -notimeout git msgpack https://github.com/aaulia/msgpack-haxe.git',
'sudo haxelib -notimeout git babylonhx https://github.com/babylonhx/BabylonHx_2.0.git'
]));
gulp.task('dox', shell.task([
'lime build html5 -xml',
'haxelib run dox -i bin_lime/html5/ -o api/'
]));