Skip to content

rendering files before compression #14

@fgutmann

Description

@fgutmann

Hi Dirk,

we need to render some files with the template engine before compressing them.
I implemented a patch for this purpose, which we want to use internally for our project.

In our version the script, single-script, stylesheet and single-stylsheet tag support an option "render".
If it is true, the file is rendered using TemplateLoader before adding the source to the compressed file.

When press is disabled ("press.enabled=false"), files that need rendering are linked as "/press/[js|css]/rendered/". The corresponding action just renders the file and outputs it uncompressed.

The improvement is of limited use because you can't pass additional parameters to the template, but it is fine for our use case.
If you wan't this option in future press versions, I'm glad to send you a pull request.

Btw. what is the licence of the press module? Is it fine for you that we use a modified version? All changes are published in my press git repository.

Thanks,

Florian

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions