jdonaldson / promhx

A promise and functional reactive programming library for Haxe
MIT License
146 stars 24 forks source link

Nodejs config #29

Closed indolering closed 10 years ago

indolering commented 10 years ago

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:.

indolering commented 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.

jdonaldson commented 10 years ago

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.

indolering commented 10 years ago

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.

jdonaldson commented 10 years ago

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.

indolering commented 10 years ago

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.