[Pas2js] Resource strings, part 2

Michael Van Canneyt michael at freepascal.org
Sun Jul 21 09:34:32 CEST 2019



On Sat, 20 Jul 2019, warleyalex via Pas2js wrote:

> For instance, when you compile a program,
>
> pas2js -Jrprogram data.pp -B
>
> It will generate an external file, e.g. "data.jrs", with all used resource
> strings for the main file and all the units it uses.
>
> Now, let's suppose, when you compile a program, with the option
>
> pas2js -Jrprogram data.pp -MainHTML
>
> ...the compiler it will auto add inline JSON data at main HTML file for you,
> all the used resource strings (*.jrs), all forms streams (*.wfm), the
> compiler will generate several script type ="application/json" for each
> resource with custom data/id tag.

The compiler itself will not emit HTML.

But you can use the postprocessor feature for this kind of thing, that is why it
was added. If necessary we can add some arguments to that or create a kind
of 'linker' file containing collected info about the generated files.

This kind of thing is exactly what TMS Web core does: it wraps extra
functionality around the compiler.

Michael.


More information about the Pas2js mailing list