Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jmgaooo opened this issue Apr 13, 2025 · 1 comment

Comments

@jmgaooo
Copy link

jmgaooo commented Apr 13, 2025

  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.
@tdewolff
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants