day8 / re-com

A ClojureScript library of reusable components for Reagent
https://re-com.day8.com.au
MIT License
796 stars 147 forks source link

Script to modify sources with :src annotations #264

Closed MawiraIke closed 3 years ago

MawiraIke commented 3 years ago

Re: #258 . This PR adds a script that imports the at macro and adds it to re-com components in the files supplied.

The instructions to run the script are in the README.md found in the created directory ./scripts.

mike-thompson-day8 commented 3 years ago

@MawiraIke This is looking great!

One thought straight off - the /scripts folder might eventually contain a number of scripts.
So, I think it needs to be in a subfolder like:

/scripts/add-src-arg-to-your-entire-codebase (better name?)

Other thoughts to follow.

MawiraIke commented 3 years ago

@mike-thompson-day8 Thanks, I have pushed new commits with the changes which:

  1. Moves the scripts to the directory ./scripts/add-at-macro
  2. Updates the README with the new instructions
MawiraIke commented 3 years ago

I have pushed new commits with the changes. I have added examples to most functions, the code should a bit more clear now.

mike-thompson-day8 commented 3 years ago

@MawiraIke Thank you for this excellent PR. I'm going to merge now. And thank you also to @superstructor for mentoring you through the process.

mike-thompson-day8 commented 3 years ago

@MawiraIke After accepting the PR, I have tweaked various of the docstrings with this commit (https://github.com/day8/re-com/commit/b1eed720dfc2768b87d0eef181b54d242db9f9b0). Would you mind checking to see if my edits are correct, please? Perhaps create another PR, for your further corrections to any mistakes I made? I ran out of time, so I have not reviewed all docstrings, but hopefully you can see where I was going with the edits.

MawiraIke commented 3 years ago

@mike-thompson-day8 The changes you made look great. I will make another PR to edit one or two docstrings that need some changes.