Install haxe dependencies easely

[Haxe newbie inside]
As a lot of tools these days, Haxe has an easy and quick way of installing all the third party dependencies needed for a project. [EDIT: this method doesn’t install dependencies¬†only for the current project, but globally, in /usr/lib/haxe/libs]

I wanted to use a “standard” json like described here :
http://haxe.org/manual/haxelib-json.html

But it seems it is not managed by haxelib install command.
So I finally found this way:

  1. Create a file named dependencies.hxml
  2. Add one line by library you want to install:
    -lib lime
    -lib openfl
  3. You can add the version you want like this:
    -lib actuate:1.8.6
  4. Finally execute
    $ haxelib install dependencies.hxml