Prev | Current Page 726 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


JavaScript as haXe Target
When the haXe compiler targets the JavaScript environment, a single .js file is produced containing a
bootstrap section and the code introduced by the developer. This can be a little confusing for the
JavaScript developer that is often accustomed to importing several files each with its own purpose.
Remember though that haXe produces just one file because the module/functionality selection is made
at compile time and only the needed definitions are exported in the output, keeping the resulting file
lean and easy to deploy (one file ready to go).
The JavaScript produced by the haXe compiler is meant to be human readable and it is not optimized for
small footprint size. If you are not satisfied with the size of the output, you can find a lot of useful tools
that can reduce it considerably and that can even obfuscate it to discourage reverse engineering. If you
are in need of such a tool, search for javascript compressor or javascript minification on your Internet
search engine of choice.


Pages:
714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738