-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Description
in the case of tailwindcss, even tho the cli has that name, the package is actually @tailwindcss/cli so running npx tailwindcss doesn't make sense. the proposal is to add an special case where it actually runs npx --no-install @tailwindcss/cli <args> whenever we call exec.Npx. this will allow to use tailwindcss without any prior setup (apart from having npx)
the objective of this change is to avoid needing to install tailwindcss cli globally, nor having a npm/js project setup under hugo (defeats the purpose of the standalone tailwindcss cli)
change should be in this function
Lines 176 to 177 in 7624176
| // If name is "tailwindcss", we will try the PATH as the second option. | |
| func (e *Exec) Npx(name string, arg ...any) (Runner, error) { |
particulary adding a new exception here
Lines 215 to 218 in 7624176
| if name == "tailwindcss" { | |
| // See https://github.com/gohugoio/hugo/issues/13221#issuecomment-2574801253 | |
| locations = []binaryLocation{binaryLocationNodeModules, binaryLocationPath, binaryLocationNpx} | |
| } |
I am open to do the PR after the heads up