I have a react application (built with create react app) that has to be deployed to two different environments. One is mother, the other one is father, and each environment has prod, uat and dev. I added the following files:
.env.mother.prod
.env.mother.uat
.env.mother.dev
.env.father.prod
.env.father.uat
.env.father.dev
How can I set the script so that I can run something like this npm build --person mother --env prod? Is it possible to make a build with flags and I pass the environments over there?
Something like this:
"scripts": {
"start": "react-scripts start [person] [env]",
"build": "react-scripts build [person] [env]"
},