Closed indolering closed 10 years ago
Actually, now that I think about it, since you are providing a library which others will use to produce their own libraries, I think checking for -D nodejs
and -lib nodejs
at compiletime is a mandatory feature.
I can't do a check like that because I don't know if they actually want the node version (vs. the plain javascript version). The two versions are slightly different.
Derp, I was thinking runtime at first ... I need to wait to not submit tickets at the end of the day.
Sorry: I think you should check for it at runtime. Maybe you could set a boolean var during compile time to check register whether -D nodejs
and -lib nodejs
were present and then compare those values against the runtime environment.
It's really unfortunate that Haxe doesn't have a separate Node.js target yet. Added a section to the readme in #31.
Ah, ok. I can add a check if a base js version is running in node, and throw an error. Although, if you're developing for node in haxe you really should be aware of that flag.
Although, if you're developing for node in haxe you really should be aware of that flag.
There is no good overview of how to develop for NodeJS using Haxe, at least none that I can find! This is a good way of introducing newbs, like myself :grinning:.
I would try to roll this feature myself but I have no idea where to even start.
You fail to mention the required
-D nodejs
flag and the dependency on the nodejs library.I would suggest you manually check for the nodejs libraries presence, for the newbs :grinning:.