
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
print-project
Advanced tools
A simple CLI tool to print the project tree structure and file contents
The print-project
command-line tool scans a specified directory and generates a report including the tree structure
and content of files that do not match given ignore patterns. It is useful for documenting or analyzing the file layout
of projects, especially in development environments.
You can install print-project
using npm:
npm install -g print-project
Ensure you have Node.js installed on your machine to use this package.
After installation, the print-project
tool can be run from the command line.
print-project <startPath> [ignorePatterns]
<startPath>
: Required. The path to the directory you want to scan.
e.g., /path/to/project
[ignorePatterns]
: Optional. A comma-separated list of glob patterns to ignore files and directories.
e.g., "node_modules,*.log,dist,coverage"
You can use either print-project
or pprint
to run the tool:
print-project <startPath> [ignorePatterns]
or
pprint <startPath> [ignorePatterns]
To remove the default ignore patterns, add the --remove-default
flag:
print-project <startPath> --remove-default
You can also combine default patterns with your own:
print-project <startPath> "your,custom,patterns" --remove-default
The following patterns are ignored by default:
node_modules,*.log,dist,coverage,documentation,.prettierrc,.gitignore,dist,scripts,.serverless,.idea,.git,.DS_Store,.husky,package-lock.json
Print all files and directories:
print-project ./src
or
pprint ./src
Ignore specific patterns:
print-project ./src "node_modules,*.log,dist,coverage"
or
pprint ./src "node_modules,*.log,dist,coverage"
Use default ignore patterns:
print-project ./src
Use default ignore patterns and add custom ones:
print-project ./src "*.tmp,*.bak"
project-print.txt
in the current working directory containing:
print-project
or pprint
for convenience.project-print.txt
.The output project-print.txt
includes:
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome. Please open an issue first to discuss what you would like to change, or directly submit a pull request.
FAQs
A simple CLI tool to print the project tree structure and file contents
The npm package print-project receives a total of 26 weekly downloads. As such, print-project popularity was classified as not popular.
We found that print-project demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.