minify
minify copied to clipboard
The CLI is missing the TemplateDelims option, which should support specifying multiple TemplateDelims.
- The TemplateDelims option is currently only available when used as a library; we hope to add it as a CLI parameter.
- 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.
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.