I have few npm scripts in my package.json as:
"scripts": {
"serve-india-local": "ng serve --project pro-india -c local",
"serve-india-stag": "ng serve --project pro-india -c stag",
"serve-india-prod": "ng serve --project pro-india -c prod",
...
}
Similarly for brazil
"scripts": {
...
"serve-brazil-local": "ng serve --project pro-brazil -c local",
"serve-brazil-stag": "ng serve --project pro-brazil -c stag",
"serve-brazil-prod": "ng serve --project pro-brazil -c prod"
}
And similarly, I can have a few more scripts for different countries and configs.
I want to reduce this to a single script where I can take just 2 params:
countryName
config
So the final script should look something like this:
"serve-india-prod": "ng serve --project pro-$countryName -c $config"
Can someone help me to achieve this ?