-
-
Notifications
You must be signed in to change notification settings - Fork 330
Open
Description
Hello. I would like to continue the topic raised in #646.
I want a flag to control the files to watch for templ to rebuild the app, I want to add other glob patterns besides *.go
and .templ
extensions.
Here is my layout:
assets/
├── static/
│ └── style.css
└── view/
└── layout/
└── base.templ <-links to style.css
The style.css
can't be embedded as templ css components since they are don't support a lot of stuff like attribute selectors, media queries etc. The problem is not only related to css files but with all user configuration files so we can't just add fixed extensions.
Here is how this flag will work:
--pattern="assets/**/*.css"
--pattern="*.css"
--pattern="*.env,*.yaml"
--pattern="config/server.toml
Pretty similar to how task glob patterns are working.
Full command:
go tool templ generate --watch --proxy="..." --pattern="assets/**/*.css" --cmd="go run ./cmd/app"
hmatny
Metadata
Metadata
Assignees
Labels
No labels