I am using npm as a build tool and so in my package.json, and some of my scripts depend on other scripts:
package.json
{ \"test\": \"npm run lint && mo
The $npm_execpath environment variable refers to the build tool, so just replace npm with the $npm_execpath:
$npm_execpath
npm
{ "test": "$npm_execpath run lint && mocha" }
Both npm test and yarn test will work, and will use the appropriate build tool.
npm test
yarn test