Ever time my project fully restarts I need to run “cp -r ./node_modules/m3u8stream/dist ./node_modules/m3u8stream/lib” again otherwise my project crashes/doesn’t boot.
Is there any way to make this command run from a js file? If yes how?
Yes.
-
you could put that command line directly in your package.json’s scripts “install” command, beside the “start” command that you currently have.
-
If you are interested in javascript-calls-bash in general, this is an example.
Hope this helps,
Johnicholas
1 Like
You can use child_process
(es) to execute other files on your filesystem, also take a look at shelljs.