[js] Closure for haXe?

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

[js] Closure for haXe?

Viktor Hesselbom-2
Hello list!

Right now the compiled code for the JavaScript-target is quite large. I imagine this is quite a big turnoff for potential users.

What users can do right now is run the outputted code through something like Google Closure ( http://code.google.com/intl/sv-SE/closure/ ) but has anyone thought about integrating this with the compiler somehow? Or perhaps write their own lite version of Closure to remove whitespace and shorten function parameters etc?

Best,
Viktor

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

Re: [js] Closure for haXe?

Michiel Crefcoeur
Check out http://code.google.com/p/jstm/
It's being used for several websites, for example http://hollander.nl.
It's a very uninteresting Dutch website but you can look at the network traffic to see what the generated js files look like for a production site, for instance, this is the DateTools class:

Cheers,
Michiel.

2011/8/31 Viktor Hesselbom <[hidden email]>
Hello list!

Right now the compiled code for the JavaScript-target is quite large. I imagine this is quite a big turnoff for potential users.

What users can do right now is run the outputted code through something like Google Closure ( http://code.google.com/intl/sv-SE/closure/ ) but has anyone thought about integrating this with the compiler somehow? Or perhaps write their own lite version of Closure to remove whitespace and shorten function parameters etc?

Best,
Viktor

--
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: [js] Closure for haXe?

rammserker
Have you used the --dead-code-elimination option of the compiler? It reduces the size of JS output significantly.

Max
0 1 0 | 0 0 1 | 1 1 1



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

Re: [js] Closure for haXe?

Viktor Hesselbom-2
Thanks for the suggestions! I did not know about --dead-cole-elimination, very helpful.

What I personally am using right now is TextMate where I run a bash script on compile so I run closure immediately after. Unfortunately closure is written in Java and takes quite a while to complete compared to haXe compiler... But it's ok, I just need it for the version that goes live anyway.

2011/9/1 Maximiliano Fernández <[hidden email]>
Have you used the --dead-code-elimination option of the compiler? It reduces the size of JS output significantly.

Max
0 1 0 | 0 0 1 | 1 1 1



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


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