When you develop a program or module,
you should do so in
I
Direct Eas 4B.
However, you can also have Eas 4B
export compiled Javascript code.
This still needs Eas 4B to run,
but there are three
reasons why
this is a good thing for advanced users:
1. Direct Eas 4B needs to compile your Eas code
into Javascript, which web browsers understand,
upon every loading and reloading the page.
For big projects, this may take a few
moments
that can be saved by using Export Eas 4B instead.
2. If you don't want to share your
source code,
Export Eas 4B is the right choice,
as it creates compact (and very cryptic)
Javascript code without any comments
or unneeded whitespace.
(Experts can of course always decompile
any program, including *.exe files,
and reverse-engineer them,
but it protects against most people.)
3. You can run
several Export Eas 4B modules
in the same project in parallel,
also in combination with Direct Eas 4B.
How to:
1. After thoroughly testing your Eas 4B code,
add the following line as the
first line
of your code:
where you replace ? with the name that
your exported Javascript file shall have.
The name must be of the
format
[a-zA-Z][a-zA-Z0-9_]*
(start with a letter, contain only letters,
digits and/or the underscore).
2. Copy the generated Javascript code
and
save it under the chosen name.
3. Include the exported Javascript by
<script src=?.js></script>
(again replacing ? with your chosen name),
somewhere
after the inclusion of Eas 4B
itself (<script src=Eas.js></script>).