Reputation: 23
I am pretty new to Tailwind and CSS as a whole and am trying to build this CSS file:
@tailwind base;
@tailwind components;
@tailwind utilities;
.btn{
@apply rounded-full py-2 px-3 uppercase text-xs font-bold cursor-pointer tracking-wider
}
With this command
npm run build-css
But I get this response
> [email protected] build-css C:\Users\user\Tailwind\project
> tailwindcss build src/styles.css -o public/styles.css
[deprecation] Running tailwindcss without -i, please provide an input file.
Done in 3220ms.
And nothing happens. How do I specify the input file?
Upvotes: 2
Views: 15583
Reputation: 839
You can try the below command,
npx tailwindcss -i ./src/tailwind.css -o ./dist/tailwind.css
Where the file after -i
is your source css file where you have extracted the custom css components and -o
is where you want your final build file.
For more, have a look at the link in tailwindcss website - Using Tailwind CLI
Upvotes: 0
Reputation: 14203
As error says, you need to provide input file with -i
flag. Change your script inside package.json
to this
tailwindcss -i src/styles.css -o public/styles.css
More information about Tailwind CLI is here
Upvotes: 5