How to import multiple js file to another file automatically using a command or a script?

Is there a script or a command which I can run in the terminal in order to import multiple files from a folder to another file in another folder

I want to get all the files in the components directory and import them into the App.js file automatically

You would probably have to write it yourself…which would probably take longer than doing it manually.