Q
Q
quiplunar2020-07-22 14:11:58
Node.js
quiplunar, 2020-07-22 14:11:58

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 question

Ask a Question

731 491 924 answers to any question