I'm running yarn run build, which will re-create the directory build of my project. The thing is: whenever this is done, I lose one file that I must have inside of build/, which I manually copy and paste there.
So, naturally, I created the following script inside of package.json in order to have it done automatically:
"scripts": {
"build": "react-scripts build",
"postbuild": "npm run copy",
"copy": "copy Staticfile build"
},
Now the thing is: will it work on Mac? Linux? I only have an Windows so I don't know and cannot test either, but I assume that it wouldn't work since copy statement is native on windows but not on other OS...
So the question is: how to make it be generic and OS-independent?
Thank you!