Calamari / BehaviorTree.js

An JavaScript implementation of Behavior Trees.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support UMD instead of assuming browser global

mreinstein opened this issue · comments

I want to use BehaviorTree.js in my node project. But the current build assumes it runs in a browser window.

It would be really nice to use UMD (Universal Module Definition) so this code could run in requirejs, commonjs(node), and browsers.

https://github.com/umdjs/umd/blob/master/returnExports.js#L40-60

@Calamari thoughts?

Yeah. That sounds reasonable.
I also thought about making it available in Node, but didn't get to it yet. Maybe a request is all I needed ;)

someone did add it to npm but they didn't link to your github repository or list you in the credits: https://www.npmjs.org/package/behaviortree

I'd recommend reaching out to this person and asking them to give you ownership of the npm repo. :)

Oh, that is cool. Didn't know, there was a package for my repository. I surely will reach out to him.

For a real wrapper, I would have to change the script building mechanism from old ruby stuff to something useful like grunt or gulp. I think I will get to it in the weekend.

I just published a new version, that should also work on Node.js as well. (I assume it does, because all the tests passe there too). It is also available on NPM now. Thanks for the tip.

If you find more things, don't hesitate to ask. Feedback is always appreciated.