phoenixframework / tailwind

An installer for tailwind
MIT License
467 stars 61 forks source link

Update tailwind.ex custom path instructions #94

Open 03juan opened 9 months ago

03juan commented 9 months ago

I ran the commands npm install -g tailwindcss@3.3.5 and npm install -g tailwindcss@2.2.16 in both Ubuntu and Windows with nodejs v18.18.2 and v20.8.0. None of those combinations generated the bin file in the documented path, but I did find them from the root NPM_PREFIX directory.

Could someone confirm this is the case on Mac Intel and Apple Silicon?

Ubuntu shell: nodejs v20.8.0 tailwindcss v3.3.5

Windows PowerShell: nodejs v18.18.2 tailwindcss v2.2.16

03juan commented 9 months ago

We could also add instructions for setting the env variable?

To set the environment variable in your shell of choice, run one of the following commands:

Linux (bash/zsh)

export MIX_TAILWIND_PATH=$(npm prefix -g)/bin/tailwind

Windows (PowerShell)

$env:MIX_TAILWIND_PATH = "$(npm prefix -g)\tailwind.ps1"

Windows (cmd.exe)

FOR /F "tokens=*" %i IN ('npm prefix -g') DO SET MIX_TAILWIND_PATH=%i\tailwind.cmd