tailwind-ppx
tailwind-ppx copied to clipboard
Extend the use-tailwind-ppx script with new parameters
To make the script more useful, I think it'd be helpful to have the script take in the following parameters:
-
--file <path/to/file>
: takes in a single Reason file - check the extension (we need to have this one) -
--write
: tells the script to actually write the new contents, in-place (this parameter is up for discussion). If--write
is not supplied, print the new contents to the console.
@dylanirlbeck I'm happy to take a crack at this one, as long as you don't mind my turnaround time being a week+ (work is busy lately).
To clarify the usage of --write
- if this new parameter is present, it would behave as the script behaves now, correct? In addition, the default behavior of the script would be to output changes to stdout instead of writing in-place. Let me know if I've characterized the ask properly.
Hi @bdunn313! You’re exactly right — default is stdout, including —write actually writes to the file. No worries on turnaround, take your time and let me know if you have any questions.