Takes the current working directory and checks for package.json
recursively in every folder and runs npm
with a given command for it.
Just use the npm command and arguments you wish to execute!
npm-recurser <npm-command> <npm-arguments>
Examples of common commands:
npx npm-recurser install <package-name>
npx npm-recurser audit
npx npm-recurser prune
The script supports additional arguments preceding the npm command:
npm-recurser <argument> <npm-command> <npm-arguments>
Use this argument to prevent execution of npm in the root folder.
Example:
npm-recurser --skipRoot update
This is a fixed and updated version of npm-recursive. Credits go to its original author!