Registry / devops / web-crush-cli

web-crush-cli

JSON →
library1.2.0jsnpmunverified

Web-Crush CLI is a zero-config build tool for vanilla web projects that minifies HTML, CSS, and JS files while preserving folder structure and copying all other assets. Version 1.2.0 uses Terser, Clean-CSS, and html-minifier under the hood. Released under MIT license by Anson Jaison, it offers a simple npx command, optional configuration via web-crush.config.json, and a 'Recruiter Safe Mode' that keeps console.logs by default. Unlike heavier tools like Vite or Webpack, it requires no setup and handles deep recursion automatically.

npm install web-crush-cli
INSTALL
IMPORT
SIG · WEB-CRUSH-CLI
W
web-crush-cli
devopsjavascriptv1.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

run
run from CLI: npx web-crush-cli
require('web-crush-cli')
This is a CLI tool, not a library. Use npx or install globally.

Runs the minifier in the current directory, outputting to public/.

npx web-crush-cli
Debug
Known issues
deprecatedThe 'assets' configuration key is no longer needed; assets are auto-detected.
fix
Remove 'assets' from web-crush.config.json; it is ignored.
affects: >=1.2.0
gotchaBy default, console.log statements are preserved (Recruiter Safe Mode). To remove them, set dropConsole: true.
fix
Add { "dropConsole": true } to web-crush.config.json.
affects: >=1.0.0
gotchaThe output directory is overwritten each run; any manual changes in public/ will be lost.
fix
Backup public/ or set outDir to a different location.
affects: >=1.0.0
breakingVersion 1.0.0 changed the output structure to preserve original folder hierarchy; earlier versions flattened files.
fix
Update paths if relying on flat output.
affects: >=1.0.0
Errors
Common errors & fixes
npx: command not found: web-crush-cli
npx not installed or out of date
fix
Install Node.js >=12 or run npm install -g web-crush-cli
Error: Cannot find module 'terser'
Missing dependency when using as a library (wrong import)
fix
Use the CLI tool via npx or globally; do not require() it.
public/ folder not created
No HTML, CSS, or JS files found in current directory
fix
Run the command in a directory containing at least one .html, .css, or .js file.
ENOENT: no such file or directory, open 'web-crush.config.json'
Optional config file missing but not required
fix
Ignore or create the file if you need custom options.
Upgrade
Version history
1.2.0latest on npm
Audit
Dependencies
terseroptionalJavaScript minification engine
clean-cssoptionalCSS minification engine
html-minifieroptionalHTML minification engine
Agent activity
5 hits · last 30 days
node
4
Resources
web-crush-cli — npm install web-crush-cli · libregistry