I have npm script defined like this
"scripts": {
"compress": "uglifyjs src/script.js -o src/script.js"
}
which I can run by the command npm run compress
.
I want to make the name of the base folder i.e. 'src' dynamic, so I can pass the base folder name as param while running the script, something like
npm run compress --base_folder=src
to run script
"compress": "uglifyjs ${base_folder}/script.js -o ${base_folder}/script.js"