diegohaz/generact

String replace in copied file?

flybayer opened this issue · 2 comments

Tried this for the first time. I was expecting it to string replace all the names in the new file, but it seems that's not currently a feature unless something broke for me.

Is is something you'd consider?

  1. generact BigDogs
  2. Set new name SmallDogs
  3. generact auto replaces all versions of BigDog with SmallDog (so bigDog->smallDog, big_dog->small_dog, etc)

Probably related to #14 (comment)

I chose not to update those names because it could lead to false positives.

But it should replace all BigDogs words by SmallDogs. Isn't it working for you?

No, it didn't rename anything. I manually passed it the path to events.ts, a mobx-state-tree store.

What about adding a CLI flag to replace all variants? If it doesn't replace all variants, it's quicker and easier for me to just do the normal copy/paste dance.