Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tailwind cli is not processing css #552

Closed
ansarizafar opened this issue Sep 12, 2018 · 5 comments
Closed

Tailwind cli is not processing css #552

ansarizafar opened this issue Sep 12, 2018 · 5 comments

Comments

@ansarizafar
Copy link

I am using tailwincss ver 0.6.5 and node ver10.7.0. I have followed the installation guide and trying to process my css with tailwind cli but cli is not processing my css just outputting my own css file as it is. I am using these steps.
./node_modules/.bin/tailwind init tailwind.js
I am using the sample css from the guide with tailwind directives to create my css file tailwind.css
then using the following command to process my css.
./node_modules/.bin/tailwind build tailwind.css -c tailwind.js -o devstyles.css

tailwind build command is just copying tailwind.css to devstyles.css and not processing tailwind.css to generate styles.

@adamwathan
Copy link
Member

I've just created a repository to try and replicate this but can't:

https://github.com/adamwathan/tailwind-cli-test

When I run ./node_modules/.bin/tailwind build tailwind.css -c tailwind.js -o devstyles.css from the root of that project, devstyles.css is created with all the replaced CSS like you see in the committed file.

Can you share a repository that reproduces the issue so I can try and troubleshoot what's different?

@ansarizafar
Copy link
Author

Cli was working fine in the past, may be not working with Node v 10. Here is the repo https://github.com/ansarizafar/tailwindcss

@adamwathan
Copy link
Member

Ah ok I see the issue, you are trying to use postcss-import as well. The Tailwind CLI doesn't pick up your postcss.config.js file or anything like that, it only does Tailwind's processing.

If you want to use full-blown PostCSS and include other plugins and stuff, you need to use a proper build tool that supports PostCSS like Webpack, Gulp, etc.

@adamwathan
Copy link
Member

Sent you a PR which shows you how to do what you want using postcss-cli:

ansarizafar/tailwindcss#1

@ansarizafar
Copy link
Author

@adamwathan Thanks for the help. Its working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants