Skip to content

Investigate using functions directly in .pug templates #7

Description

@brewingcode

pug-pack is heavily inspired by https://github.com/jescalan/roots, and one of the things roots does is use JavaScript functions as template variables:

html
  head
    != css()

In development, this would output a series of <link> tags for each css file. In production, it would output a single <style> tag with all the css files minified and concat'd together.

This is also shorter than the :inject(...) custom filter syntax.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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