a-h / templ

A language for writing HTML user interfaces in Go.
https://templ.guide/
MIT License
8.39k stars 277 forks source link

docs: correct documentation for source-map-visualisations argument #1002

Closed matthewspivey closed 6 days ago

matthewspivey commented 1 week ago

The documentation of the templ generate command refers to the -sourceMapVisualisations argument. Using it generates the following error.

$ templ generate -sourceMapVisualisations .
flag provided but not defined: -sourceMapVisualisations

However, using the more conventionally named -source-map-visualisations argument successfully generates HTML files to visualize the templ code and its corresponding Go code, as shown below.

$ templ generate -source-map-visualisations
(✓) Complete [ updates=302 duration=520.239583ms ]

To resolve this, we can update the documentation to refer to the -source-map-visualisations argument instead.