We will incorporate npm specific environment variables when executing various npx commands. In our example, we will transpile code to a folder name that matches the version of the current package.
"scripts": { "build": "babel index.js -d lib/$npm_package_version" },
output file will be stored in lib/1.0.0/index.js