asset-scanner

1.0.2 • Public • Published

📦 asset-scanner

A powerful Fast and Lightweight CLI tool to scan and analyze all image assets in your project. Easily filter by size, type, and location. Generate reports with just one command.


🚀 Features

  • 🔍 Scans entire project or specific directory
  • 📂 Supports filtering by image type (png, jpg, gif, etc.)
  • 📏 Filter assets by size (--min, --max in KB, MB, Bytes)
  • 📊 Shows total assets, filtered assets, and type breakdown
  • 📄 Generates a JSON report file with asset info
  • 📌 Sort by size

Supported formats

  • png , jpg, gif, jpg, jpeg ,webp , svg

📥 Installation

To install asset-scanner globally on your system, use the following npm command:

npm install asset-scanner

📥 Usage

Run the command to scan your assets:

npx asset-scan [options]

⚙️ Options

Option Description Example
--path Folder to scan (defaults to current directory) --path ./src/assets
--types Filter by image type (comma separated) --types png,jpg
--min-size Minimum file size in KB (KB) --min-size 100KB
--max-size Maximum file size in KB (KB) --max-size 2000KB
--sort Sort results by size --sort size
--save File name to save the report in JSON format --save assets-report.json
--stats Shows total assets, filtered assets, and detailed types breakdown --stats

📌 Examples

npx asset-scan --types png,gif --sort size --save output.json
npx asset-scan --stats
npx asset-scan --min-size 1KB --max-size 1000KB

Package Sidebar

Install

npm i asset-scanner

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

17.4 kB

Total Files

7

Last publish

Collaborators

  • aniketkapoor