Woah, just learned you can use $npm_execpath to write npm scripts that work...


Woah, just learned you can use $npm_execpath to write npm scripts that work with both npm and Yarn:

"prebuild": "$npm_execpath run clean"

$npm_execpath is replaced with npm or yarn depending on what command ran it. 😎

#npm #javascript

View original on X