In the past, you've needed to either write a package.json script or use the node_modules/.bin
directory to access binaries installed in your node_modules. npx enables you to access the binaries much more easily and try out options before you settle on what you want to add to your package.json scripts.
In command line, you can do:
npx webpack --optimize-minimize index.js bundle.js
to test out the command.
Instead of:
{ "scripts": { "build": "webpack --optimize-minimize index.js bundle.js" } }