bake

Consistent access to build data in macro and runtime contexts
https://github.com/ohmrun/bake

To install, run:

haxelib install bake 0.9.2 

See using Haxelib in Haxelib documentation for more information.

README.md

Bake

Metadata from both the macro context and the runtime context of Haxe.

Usage

  class Main{
    static public macro function test(e:Expr){
      final bake = Bake.pop();//Baking
    }
    static public function main(){
      final bake = Bake.pop()://Baked
    } 
  }

During the Macro stage, the type is called Baking, during runtime, it's called Baked

  public var is_runtime(get,null):Bool;
  public var root(default,null):haxe.io.Path;//Build root
  //see get_build_location for guessing the current build folder
  public var classpaths(default,null):Array<String>;
  public var args(default,null):Array<String>;
  public var id(default,null):String;//Generates a uuid in Plugin
  public var defines(default,null):Array<bake.Field<String>>;
  public var timestamp(default,null):String;
Contributors
0b1kn00b
Version
0.9.2
Published
2 months ago
License
MIT

All libraries are free

Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on GitHub!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on GitHub