Install Haxe libraries with git.
Until there is a Haxe library manager that does proper version locking (as in CocoaPods or Yarn), I prefer checking-in all my haxelibs in my project's git as submodules.
haxelib --global install gitemall
haxelib --global run gitemall [hxml]
- Create a directory:
mkdir my_new_proj
- Initialize Git:
cd my_new_proj && git init
- Write a hxml file:
echo "-main Main -js bin/index.js -lib tink_web -lib buddy" > build.hxml
- Git'em All!!!
haxelib --global run gitemall
(Be prepared to input urls manually when they can't be found)
This little program will do the following things:
- Create folder
.haxelib
&haxelib
, if not yet exist - Parse the hxml in current directory
- For each dependencies,
git submodule add
it. - Install the libraries by specifying the path in
haxelib/libname/.dev
- Find haxelib.json in the libraries and parse it. Goto Step 3.
- Run
git submodule update --init --recursive
, to fetch all submodules reference by the libraries - Done
If the url of a library is not found (e.g. not yet published to lib.haxe.org), it will prompt for user input.