tailwind-ppx icon indicating copy to clipboard operation
tailwind-ppx copied to clipboard

Extend the use-tailwind-ppx script with new parameters

Open dylanirlbeck opened this issue 4 years ago • 2 comments

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 --writeis not supplied, print the new contents to the console.

dylanirlbeck avatar May 16 '20 19:05 dylanirlbeck

@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.

bdunn313 avatar Jun 10 '20 12:06 bdunn313

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.

dylanirlbeck avatar Jun 10 '20 13:06 dylanirlbeck