buildjs -- generate externs for haxe JS automatically!

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

buildjs -- generate externs for haxe JS automatically!

singmajesty
I have just published a project on haxelib, that can generate haxe externs  
automatically.

It was designed to handle JSON output from JsDuck, which has worked  
wonderfully to generate externs for Sencha Touch 2 (which is also  
available on haxelib, as "senchatouch")

Here's a blog post where I talk a bit more about it:

http://www.joshuagranick.com/blog/2011/10/14/use-buildjs-to-make-externs-for-haxe-js-automatically/

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: buildjs -- generate externs for haxe JS automatically!

Jason O'Neil-2

You're amazing!

And here I was looking at creating that extern manually, like a sucker :)

Thanks so much!

Jason
...

Sent from my phone, so apologies for any typos...

On Oct 15, 2011 3:32 AM, "Joshua Granick" <[hidden email]> wrote:
I have just published a project on haxelib, that can generate haxe externs automatically.

It was designed to handle JSON output from JsDuck, which has worked wonderfully to generate externs for Sencha Touch 2 (which is also available on haxelib, as "senchatouch")

Here's a blog post where I talk a bit more about it:

http://www.joshuagranick.com/blog/2011/10/14/use-buildjs-to-make-externs-for-haxe-js-automatically/

--
haXe - an open source web programming language
http://haxe.org

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: buildjs -- generate externs for haxe JS automatically!

sledorze
In reply to this post by singmajesty
Just to beware of Js coding style.. and what you can came up with..


find signature in mongodb collections.. (you'll start to understand my point on haxe and nodeJs..) :


/**
 * Various argument possibilities
 * 1 callback?
 * 2 selector, callback?,
 * 2 callback?, options  // really?!
 * 3 selector, fields, callback?
 * 3 selector, options, callback?
 * 4,selector, fields, options, callback?
 * 5 selector, fields, skip, limit, callback?
 * 6 selector, fields, skip, limit, timeout, callback?
 *
 * Available options:
 * limit, sort, fields, skip, hint, explain, snapshot, timeout, tailable, batchSize
 */
  @:overload(function() : Cursor)
  @:overload(function(fields : Dynamic) : Cursor)
  @:overload(function(options : Dynamic) : Cursor)
  @:overload(function(selector : Dynamic, fields : Dynamic) : Cursor)
  @:overload(function(selector : Dynamic, options : Dynamic) : Cursor)
  @:overload(function(selector : Dynamic, fields : Dynamic, options : Dynamic) : Cursor)
  @:overload(function(selector : Dynamic, fields : Dynamic, skip : Int, limit : Int) : Cursor)
  @:overload(function(selector : Dynamic, fields : Dynamic, skip : Int, limit : Int, timeout : Int) : Cursor)
  @:overload(function(callback : Error -> Cursor -> Void) : Void)
  @:overload(function(fields : Dynamic, callback : Error -> Cursor -> Void) : Void)
  @:overload(function(callback : Error -> Cursor -> Void, options : Dynamic) : Void)
  @:overload(function(selector : Dynamic, fields : Dynamic, callback : Error -> Cursor -> Void) : Void)
  @:overload(function(selector : Dynamic, options : Dynamic, callback : Error -> Cursor -> Void) : Void)
  @:overload(function(selector : Dynamic, fields : Dynamic, options : Dynamic, callback : Error -> Cursor -> Void) : Void)
  @:overload(function(selector : Dynamic, fields : Dynamic, skip : Int, limit : Int, callback : Error -> Cursor -> Void) : Void)
  public function find(selector : Dynamic, fields : Dynamic, skip : Int, limit : Int, timeout : Int, callback : Error -> Cursor -> Void) : Void;

:)

Stephane