Hi all,
I'm just trying to put together a javascript project in Haxe. My goal is to use the well known requirejs system for all my project files.
So what i try to do now is to build my project files individually and separately into js files. With my build.hxml is simple:
-main Main
-js out/production/ExMachinaHaxe/debug/Main.js
-cp src
--next
-js out/production/ExMachinaHaxe/debug/t/Test.js
-cp src
t.Test
So it works great, expect one thing:
When i need to use my t.Test class from the Main, i have to import it. But this way the Main.js output will contain the Test class too, instead of just refer to it like this:
var Test = require("./t/Test");
So i think there should be an option in haxe compiler to convert every import tag to a require loading.
My final goal is to compile all of my project files into individual js files, where the files refer to each other through require(...).
After I want to use a builder tool to concat the hundreds of js files into a few bigger modules, according my plans for load optimalization.
Hope you get my point and can recommend something :)
Thanks a lot!