Is it possible to pass an argument to the npm command string? The info might be somewhere in docs, but brief digging didn't get me any results, moreover, it is probably beneficial to the large audience.
For example, i have a command build:docker in package.json:
"scripts": {
"build:docker": "tsc -b && sh dist.sh && docker build -t repo_name/image .",
},
I want to pass the tag variable to the command string, ex:
"build:docker": "tsc -b && sh dist.sh && docker build -t repo_name/image:$tag ."
and run it as npm run build:docker --tag '1.0'.
Is something like this possible? Thanks!