1.0.2 • Published 1 year ago
list-files-by-lines v1.0.2
list-files-by-lines
A utility to sort files by the number of lines they contain. Useful for traversing through larger codebases and refactoring.
Installation
Install globally using npm:
npm install -g list-files-by-lines
Usage
Run the command in your project directory:
list-files-by-lines options
Options
-d, --directory <path>: Specify the directory to scan (default: current directory)-e, --exclude <pattern>: Exclude files/directories matching the pattern (can be used multiple times)-m, --min-lines <number>: Show only files with at least this many lines-s, --sort <asc|desc>: Sort order (default: desc)
Examples
List all files in the current directory, sorted by line count (descending):
list-files-by-linesScan a specific directory:
list-files-by-lines -d /path/to/projectExclude node_modules and test files:
list-files-by-lines -e node_modules -e *.test.jsShow only files with at least 100 lines:
list-files-by-lines -m 100Sort in ascending order:
list-files-by-lines -s asc
License
ISC
Author
Narveer Rathore @narveer-rathore