example: production

To build, install Python 3 and V8, then run:

../js.metaret/jsm_build.py jsm_dev/example_development.jsm 

This reads jsm_dev/example_development.jsm:

metafun gcd( self, a, b )
    if (a > b)
        metaret self, a-b, b;
    if (b > a)
        metaret self, b-a, a;
    return a; 

...and transforms it into 100% standard JS: jsm_out_build/example_development.js

...and then minifies: jsm_out_mini/example_development.js

--- SCRIPT tags in the present page:

--- Result:


--- Note

Since we now have 100% standard JavaScript, metaret_standalone.js is not needed anymore.

See also example_development.html and the main article.