There are a number of cases where the ability to inject new text into an existing file would be very useful.
imports, Routes, reducers, sagas.
The trick is to figure out where this is supposed to happen, and what is to be inserted.
I think that any effort that involves parsing the file as code is too complicated and we should reach for a simpler solution. Parsing text and string matching is going to be faster and probably more reliable in the long run.
There are a number of cases where the ability to inject new text into an existing file would be very useful.
imports, Routes, reducers, sagas.
The trick is to figure out where this is supposed to happen, and what is to be inserted.
I think that any effort that involves parsing the file as code is too complicated and we should reach for a simpler solution. Parsing text and string matching is going to be faster and probably more reliable in the long run.