Closed MatthijsKamstra closed 8 years ago
maybe this is more complicated then I first thought...
-lib hxnodejs
adds also the process code
But not sure where I should send this bug...
https://github.com/HaxeFoundation/hxnodejs or even https://github.com/HaxeFoundation/haxe/
Lets see if I can call upon the allmighty @nadako :D
You can add -D hxnodejs_no_version_warning
to disable this.
Checking for process
probably makes sense, but i'm not sure how/why do you use hxnodejs API without node?
It's due to haxe-js-kit
depending on hxnodejs
, even though it's not server/nodejs only.
More generally, I wonder if it wouldn't be better to let the user -D nodejs
if he wants to.
One may want to create cross-platform haxelib (browser js / nodejs), but there's no way to make it depend on hxnodejs
without all the -D
and extraParams
.
I'm really not sure, though.
In this particular case, socket.io
's interface is really similar in node and in the browser, so it share a couple of interfaces.
All in all, I think checking for process
in hxnodejs
is fine.
Thx heroes of Haxe! Especially for the quick responds...
@nadako
-D hxnodejs_no_version_warning
did the trick@clemos
Thanks for your great tutorials @MatthijsKamstra :D
do you want me to make an issue at hxnodejs?
you could even do a PR for this https://github.com/HaxeFoundation/hxnodejs/blob/master/src/_hxnodejs/version-warning.js
I am currently working on making a socketio example. I use https://github.com/clemos/haxe-js-kit/blob/develop/test/SocketIoTest.hx as a reverence
And I ran into a bug on the client:
Played around with it and I can stop that error when I remove js-kit
Source will be generated
instead off
So I guess you do some macro magic (yes I still call it magic) and checks for Node/Node-version, which is not necessary on the client. So perhaps first a check for
process