diff --git a/readme.md b/readme.md index b0328a5..c0b9cdd 100644 --- a/readme.md +++ b/readme.md @@ -62,7 +62,7 @@ If you're using zsh or a different shell, make sure to have `~/bin` in your `$PA ``` $ wipe-modules --help - Usage: wipe-modules [path] [days] + Usage: wipe-modules [path] [days] [options] Path: The full path of your code directory @@ -70,6 +70,9 @@ $ wipe-modules --help Days: The days you want to set to mark projects as inactive + Options: + -D, --dry Only show node_modules to be removed + Example: wipe-modules ~/code 30 That will remove the node_modules of your ~/code projects diff --git a/wipe-modules.sh b/wipe-modules.sh index d5237a1..574f435 100644 --- a/wipe-modules.sh +++ b/wipe-modules.sh @@ -3,6 +3,7 @@ # variables code_dir=$1 last_modified=$2 +dry=$3 modules_removed=0 is_dir=0 is_number=0 @@ -12,7 +13,7 @@ run=0 usage() { cat <