This repository was archived by the owner on Aug 17, 2021. It is now read-only.
Adding a script to integrate tailwind-ppx into codebase#83
Merged
dylanirlbeck merged 11 commits intomasterfrom May 15, 2020
Merged
Adding a script to integrate tailwind-ppx into codebase#83dylanirlbeck merged 11 commits intomasterfrom
dylanirlbeck merged 11 commits intomasterfrom
Conversation
Collaborator
|
Nice addition! :) From my understanding, all classnames are being wrapped in <div className="custom_classname flex flex-col items-center" />It gets transformed to: className=[%tw "custom_classname flex flex-col items-center"]>Which is wrong and will produce an error since the Since we are already able to extract class names from the tailwindcss file, I think we should only transform these classes. So the example above should become something similar to: className={"custom_classname " ++ [%tw "flex flex-col items-center"]}> |
|
I have updated your lock dirs and formatted the code. Please @dylanirlbeck pull the last commit before pushing any more changes. |
….com/dylanirlbeck/tailwind-ppx into @dylanirlbeck/add-integration-script
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #81
This script would transform every existing instance (in a
.refile) ofclassName="..."intoclassName=[%tw "..."]by calling./node_modules/@dylanirlbeck/tailwind-ppx/use_ppx.exe.I should making the path to the script easier to execute, but this might not be necessary.
TODO
bsconfig.json(with a note that script could wrongly execute ifbsconfigis found earlier than project root)Investigate adding CLI parameters like(just doing all--files **/glob.refiles)