rustywind
rustywind copied to clipboard
Add ability to evaluate `tailwind.config.js` file if exists
Get custom sorter by evaluating tailwind.config.js file
Features
- Pass with
--tailwind-sortercan accept value (value would be path totailwind-config.js - If value not passed in look for
tailwind.config.jssomewhere within the home directory - Use
postcssto evaluate file, get classes from file and use that order
Implementation
- Build up
HashMapof classes from running regex on evaluated file - Save HashMap to disk using
serdeandbincode - Check
tailwind.config.jsmetadata to see if newHashMapshould get created
+1.
Spent hours debugging, turns out, it just configuration mistake. However, TailwindCSS CLI never know that its configuration is invalid https://github.com/tailwindlabs/tailwindcss-typography/issues/282#issuecomment-1226713985