prettier-plugin-go-template icon indicating copy to clipboard operation
prettier-plugin-go-template copied to clipboard

Support for JS files

Open wangchucheng opened this issue 3 years ago • 2 comments

I tried to use this plugin in my Hugo project and I found it could not work with js files well.

In Hugo, there is a feature that Hugo can execute js/css files as a template. FYI, https://gohugo.io/hugo-pipes/resource-from-template/.

But I found that if I used this feature and tried to format my project then it would break. It seems that this plugin did not have support for this, so I was wondering if this would be include in future?

Thank you for making this wonderful plugin! It is very helpful.

wangchucheng avatar Feb 06 '22 03:02 wangchucheng

I believe this project is mainly just supporting go HTML templates rather than JS or XML or CSS templates; I agree that the templating support in Hugo is really useful - I've used a custom output type to generate my _headers file w/ dynamic hash values for CSP purposes so I can use a strict-dynamic policy

jasikpark avatar Mar 06 '22 06:03 jasikpark

Related to #33 — but in a separate file.

NiklasPor avatar Mar 28 '22 09:03 NiklasPor