Hi! This blog is for news, announcements and questions regarding the
Mascara JavaScript compiler.

See also:
The online demo
Download latest release

Contact:
olav@olav.dk

Disclaimer:
ECMAScript is a trademark of Ecma International.

Powered by Squarespace
« Mascara is not for people who hate JavaScript | Main | Release 0.1.3 »
Saturday
Jun072008

Version 0.1.5 released

I have just released version 0.1.5. Download.

It includes a proof-of-concept CGI-script that allows us to serve ES4 translated on the fly. I will not recommend it for any kind of production use: Since there is no caching involved, it is rather slow and unreliable. There are also some security issues.

However, if you like to develop by alternating between writing in an editor and reloading a browser, this script will make it easy and fun.

It is used like this:

  1. Drop the root folder somewhere on your server where it can be executed, e.g. in the /cgi-bin folder. The script cgitranslate.py is the entry point, and should be made executable.

  2. Configure the setting cgi_scriptbase in config.py to point to the folder where you keep your ES4 files (e.g /testfiles)
    You should now be able to request a translation like this:
    /cgi-bin-or-whatever/cgitranslate.py?classtest.es4

    (assuming classtest.es4 is a file in the root of the configured cgi_scriptbase folder)

  3. Use it in HTML like this:
    (script
    language="text/javascript" src="/cgi/cgitranslate.py?classtest.es4")
    (/script)

    (Sorry for the parentheses, haven't figured out how to enter HTML in blogger)

The release includes the file testweb/index.html which shows how a HTML-file can use an ECMAScript 4 file.

Have fun!

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>