Nuke Dependencies
Functions
nukeDependencies()
function nukeDependencies(packageRoot?): void
Defined in: functions/nukeDependencies.ts:26
Helper function to:
- delete the "node_modules" directory
- delete any package manager lock files that exist
- reinstall the dependencies using the detected package manager
This will attempt to validate that the directory is correct by looking for a "package.json" file. If not found, this function will print an error message and exit.
Parameters
Parameter | Type | Description |
---|---|---|
packageRoot ? | string | The path to the directory that contains the "package.json" file and the "node_modules" directory. If undefined is passed, the current working directory will be used. |
Returns
void
Whether any dependencies were updated.