COMMUNITY

[lime] Need to get a file from my haxelib library into a game build's html5 /lib folder

I am working on a library that utilizes a stand-alone javascript library specifically for html5 builds of the game. Right now, I am using the <dependency path=...> tag inside my include.xml to accomplish this:

<dependency path="lib/html5/api/javascriptfile.js" if="html5"/>
<dependency path="lib/html5/api/javascriptfile.wasm" if="html5"/>

At build time, lime puts files specified by this tag into the /lib folder. Or at least that is what I want it to do. Lime seems to be ignoring files that are not javascript files. With the above command, the .wasm file is being left behind. How can I have the build process automatically get that .wasm file into the lib folder? For development, I am manually moving it there, but this needs to be done automatically for anyone who imports my library in the future.

EDIT:

I figured it out! The trick was to use the <assets> tag with a rename attribute:

<dependency path="lib/html5/api/javascriptfile.js" if="html5"/>
<assets path="lib/html5/api/javascriptfile.wasm" rename="lib/javascriptfile.wasm" if="html5"/>

Are you planning to only support openfl/lime for your library?

@kevinresol - That is a great question. The library I am building is going to be used exclusively for games. My experience building the games with Haxe has been through the use of lime, so it is all I know at this point. Are there other tools used to build games in Haxe?

One can build a haxe/html5 game without any frameworks, but only with the Haxe language.