Haxelib Virtualenv

Ever felt the need for virtualenv in Haxe?

It isn’t quite the same thing but it should cover 80% of the cases. Calling ‘haxelib setup’ sets haxelib path globally and persistently. However haxelib library path can be overriden by setting the environment variable HAXELIB_PATH.

This only affects the current session and is great if you want to have specific library versions (specially dev versions) for one project, while in others you may want to use the global settings.

#quick example if you are in bash
export HAXELIB_PATH="/home/pheres/code/project1/haxelib";
#from this point onwards, haxelib will look here ^ for libs

#or if you are in windows
set HAXELIB_PATH="C:\Code\project1\haxelib";