8000 The CLI is missing the TemplateDelims option, which should support specifying multiple TemplateDelims. · Issue #811 · tdewolff/minify · GitHub
[go: up one dir, main page]

Skip to content

The CLI is missing the TemplateDelims option, which should support specifying multiple TemplateDelims. #811

Open

Description

@jmgaooo
  1. The TemplateDelims option is currently only available when used as a library; we hope to add it as a CLI parameter.
  2. When using libraries like Vue within Go's HTML templates, there are two types of Delims, and we would like to support configuring multiple TemplateDelims.

Activity

  1. tdewolff commented on Apr 28, 2025

    @tdewolff
    Owner

    Thanks for the suggestion. The CLI tool is supposed to automatically discover file formats and set the delimiters automatically. I'm not sure what the mimetype for Vue template file is (text/x-vue-template?), but then you can set the mimetype explicitly in the CLI, or map your custom file extension to the mimetype of a template: minify --ext {vue:text/x-template} input -o output

    Regarding supporting multiple delimiters, as I implemented the current feature I knew this would be a problem possibly. I'm not sure how to solve that cleanly.

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

      0