I'm not sure if it is deliberate, maybe it is, but I think that for the sake of consistency it should be tailwindcss?
In package.json, the CLI is declared as such:
"bin": {
"tailwind": "lib/cli.js"
},
But because of that and the fact that the docs are saying that we should use npx tailwind for using the CLI, if we use npx tailwind while Tailwind is not yet installed (as I often did just so be able to mock the config), it won't work.
So npx tailwind will work if Tailwind is installed as a dependency in the current project, but not if it isn't.
And npx tailwindcss will work either way, but I'm pretty sure it won't use the version installed in the current project. I didn't test though, but even then, I think the CLI should be renamed in a future version of Tailwind.
Yeah would be open to changing this, maybe supporting both until we eventually do a 2.0 so that we don't break anything.
I'd support this - I was trying to install this and didn't realize I'd just typed 'tailwind' - which is a different package name that has some vulnerabilities. Then when I tried to run npx tailwind init npm came back with "command not found". If all the commands in the documentation were tailwindcss I'd probably have installed that. I mean, it's my bad for not reading carefully, though, but I'd bet I'm not the only one to do this.
Thanks!
Added another entry to our bin config so both will work as of v1.2: https://github.com/tailwindcss/tailwindcss/commit/e988185f477161a9c1ae32163d5ad4215b4e0091
Most helpful comment
Yeah would be open to changing this, maybe supporting both until we eventually do a 2.0 so that we don't break anything.