A brutal, zero-config minifier for vanilla web projects.
npm install web-crush-cli> The Zero-Config Minifier for Vanilla Web Projects.



Great build tools already exist. But installing them, configuring them, and writing build scripts just to minify a simple project is time-consuming.
Web-Crush cuts out the setup. It takes your raw HTML, CSS, and JS, crushes them into a production-ready public folder, and gets out of your way.
-----
We aren't trying to replace Vite or Webpack. They are excellent. But for a simple portfolio or landing page, setting up a complex build pipeline feels like overkill.
Web-Crush is for when you just want to finish:
* Zero Config: No setup. Just run it in your project's root folder, and boomβeverything is done.
* Lightweight: Installs in seconds (~10MB).
* Recursive: Handles nested folders and complex structures automatically.
-----
You don't even need to install it. Go to your project root and run:
``bash``
npx web-crush-cli
1. Recursive Scan: It finds all .html, .css, and .js files in your root and every subfolder.terser
2. Minification: It compresses code using industry-standard engines (, clean-css, html-minifier).robots.txt
3. Universal Passthrough: It automatically copies everything else (images, fonts, PDFs, , favicon.ico) exactly as is, preserving the folder structure.public/
4. Deployment Ready: It outputs everything into a clean folder.
-----
Happy with the defaults? Do nothing.
Need control? Create a web-crush.config.json file in your project root:
`json`
{
"outDir": "public", // Default: "public"
"verbose": true, // Default: true
"dropConsole": false, // Default: false (Set to true to strip console.logs)
"exclude": ["drafts/**"] // Default: [] (Files/folders to ignore)
}
(Note: You no longer need to define an assets folder. Web-Crush now auto-detects assets anywhere in your project.)
-----
No need to list your files. Whether your file is index.html or deeply nested in blog/2025/posts/article.html, Web-Crush finds it, minifies it, and outputs it to the correct folder.
Most minifiers strip console.log to save space. Web-Crush keeps them."dropConsole": true
Why? Because many developers leave "Hello there\!" messages for technical recruiters in the console. We respect the hustle.
>(Want them gone? Set in your config).
Web-Crush scans for everything.
If it's code, it gets crushed. If it's not code, it gets copied.
* β
favicon.ico in root? Copied.sitemap.xml
* β
or robots.txt? Copied.images/
* β
, fonts/, or videos/? Copied. exclude
>(Got something you don't want copied? Add it to in your config).
-----
Before (npx web-crush-cli):
`text`
My-Portfolio/
βββ images/
β βββ me.jpg
βββ blog/
β βββ post-1.html (Nested file)
βββ index.html (400 lines, messy)
βββ style.css (50kb, comments everywhere)
βββ favicon.ico
After:
`text``
My-Portfolio/
βββ public/ <-- DEPLOY THIS FOLDER
β βββ images/ (Copied)
β βββ blog/
β β βββ post-1.html (Minified)
β βββ index.html (One line, tiny)
β βββ style.css (Compressed)
β βββ favicon.ico (Copied)
βββ ...
-----
Anson Jaison
* Website: anson.is-a.dev
* GitHub: @ansonjaison
* LinkedIn: Anson Jaison
MIT Β© Anson Jaison