Answer the question
In order to leave comments, you need to log in
How to insert text at the right place in a file?
I am writing a cli to generate components, and I need the cli to add imports to the input file. That is, I need to find that file, find the last import and insert the desired text after it. How can this be done?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question