clear_node_modules
v1.3.1
Published
help you remove all large file of node_modules in dist dir!
Downloads
16
Readme
clear_node_modules
A command-line tool to delete all node_modules directories within a specified path.
Features
- Recursively finds and deletes all
node_modulesfolders. - Allows setting a size limit to only delete
node_moduleslarger than a certain size. - Simple and easy-to-use command-line interface.
Installation
npm install clear_node_modules -gUsage
cnm <path> [limit]Arguments
path: The directory path to clean up (required).limit: The size limit in MB. Onlynode_modulesdirectories larger than this size will be deleted (optional).
Examples
Delete all
node_modulesin the current directory:cnm .Delete all
node_modulesin a specific directory:cnm /path/to/your/projectsDelete all
node_moduleslarger than 100MB in a specific directory:cnm /path/to/your/projects 100
License
MIT
clear_node_modules
一个用于清理指定路径下所有 node_modules 目录的命令行工具。
功能特点
- 递归查找并删除所有
node_modules文件夹。 - 支持设置大小限制,只删除大于特定大小的
node_modules。 - 简单易用的命令行界面。
安装
npm install clear_node_modules -g使用方法
cnm <path> [limit]参数说明
path: 要清理的目录路径 (必需)。limit: 文件大小限制 (单位 MB)。只有大于此大小的node_modules目录才会被删除 (可选)。
使用示例
删除当前目录下的所有
node_modules:cnm .删除指定目录下的所有
node_modules:cnm /path/to/your/projects删除指定目录下所有大于 100MB 的
node_modules:cnm /path/to/your/projects 100
许可证
MIT
