rm-local-modules
Removes your locally installed modules.
Use case:
- Make sure you always have latest version of your locally installed modules using it in
preinstall
. Example. There is a caveat though, as npm@3 preinstall is broken. Works fine with npm@2
CLI Options
-verbose, -v
: outputs which modules where detected and if they were successfully removed:
Tried to remove 2 local module(s): local ✔ sublocal ✔
-dir, -d <path>
: the path were to run the tool, defaults to current dir.
Programmatically
var rmLocalModules = ; var opts = log: consolelog // optional dir: '.' // mandatory; ;
Example
// package.json // ... "scripts": "preinstall": "rm-local-modules" "dependencies": "local": "file:local" "sublocal": "file:sub/local" "devDependencies": "rm-local-modules": "^0.0.0"