This blog post recorded how I came up with the idea. You may jump to the GitHub repo directly, example usage is written there.
Everthing started from an old jQuery plugin
Here is my goal to be done in Haxe:
- Register a function as a jQuery plugin by adding it to the jQuery.fn object
- Most important: Leverage Haxe’s feature such as Macros, Code-Completion, Compiler Checks to write a decent plugin