JeffreyWay / laravel-mix-tailwind

mix.tailwind()
347 stars 25 forks source link

Update for Tailwind ver 1 #8

Closed rverrips closed 4 years ago

rverrips commented 5 years ago

Hi Jeffery Not sure if this is the best approach (certainly the simplest) by just updating to run with Tailwind-ver 1. Could potentially do a fs.stat and see which of the config files is there, or simply version the npm accordingly to match tailwind version numbers? Either way, let me know if you'd like me to help with this in any other ways. Appreciate all you do! Roy

johannebert commented 5 years ago

Hey,

you can just paste a right config filename into function like this:

mix.tailwind('./tailwind.config.js');

Regards

rverrips commented 5 years ago

Thanks @johannebert - That is what I've been doing, but would suggest it's better to have the defaults set as per the currently supported upstream which will soon be v1 which is why I suggested to version the npm according and I included the peer dependency sample.

So have version < 1.0.0 use editing and >= 1.0.0 use the suggested change.

Either way, just trying to help where I can - It's a trivial change but has potential to affect a large number of people ...

mvdnbrk commented 5 years ago

I have published an updated package which is compatible with TailwindCSS v1.0 and higher.

As of version 1.0 the tailwind.config.js is optional, so if there isn't a config file in the root of your project it uses the default Tailwind config.

If you are you using a version below 1.0 it will detect the tailwind.js config file and it will use that one.