-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.hx
27 lines (21 loc) · 796 Bytes
/
App.hx
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
import js.Browser.console;
import js.Browser.document;
import js.Browser.window;
import js.Node.process;
import js.node.ChildProcess;
class App {
static inline function setText(id : String, text : String) {
document.getElementById(id).textContent = text;
}
static function main() {
window.onload = function() {
setText( 'system-version', process.platform + ' ' + process.arch );
setText( 'node-version', 'node ' + process.version );
setText( 'electron-version', 'electron ' + process.versions['electron'] );
ChildProcess.spawn( 'haxe', ['-version'] ).stdout.on( 'data', function(buf) {
var version = buf.toString();
setText( 'haxe-version', 'haxe $version' );
});
}
}
}