I am trying to compile a Haxe class without defining an entry point using an assembly file hxml.
My folder structure is as follows:
root
|
___src
|___Test.hx
|
___build.hxml
Test.hx has the following contents:
package foo;
class BarLib
{
public function new() {}
public function test() {
return "Hello from BarLib!";
}
}
build.hxml looks like that:
-cp src
--macro "include('foo')"
-js test.js
Then I run haxe build.hxmlfrom the root folder that creates the file test.js, but its contents are almost empty:
(function () { "use strict";
})();
Seems unable to find package foo.
What am I doing wrong?
source
share