dephelper is a tool designed to help developers manage unused dependencies in their Node.js projects. It allows you to detect unused dependencies, interactively uninstall them, and automatically update your package.json
file. Additionally, it can save a list of uninstalled dependencies for future reference.
- Detect unused dependencies using
depcheck
. - Interactively uninstall all or selected unused dependencies.
- Automatically update your
package.json
file after uninstalling dependencies. - Save the list of uninstalled dependencies for future reference.
- Optionally, save a list of remaining unused dependencies if you choose not to uninstall all of them.
To install dephelper globally, use npm:
npm install -g dephelper
Simply navigate to the root of your Node.js project and run:
dephelper
--uninstall-all: Automatically uninstall all unused dependencies without prompting.
- Uninstall all unused dependencies.
- Uninstall some of the unused dependencies (you can select which ones).
- Save the list of remaining unused dependencies without uninstalling.
- Do nothing and exit.
- Save Uninstalled Dependencies: If you choose to uninstall dependencies (all or some), the tool will automatically save the list of those uninstalled dependencies in unused-dependencies.json.
- The tool logs all actions (uninstalls, updates to package.json, etc.) to dephelper.log.