source-js-minifier v0.0.4 is a CLI tool that downloads a webpage from a given URL, fixes relative URLs, minifies CSS stylesheets in-place, and replaces or concatenates JavaScript with a minified version (using terser or a custom minifier built with acorn/recast/astring). It is a demonstration/work-in-progress project with no active release cadence. Key differentiators include optional concatenation of all scripts, CSS minification, and an experimental custom minifier using AST manipulation. However, it is unstable, lacks tests, and is not recommended for production use.
npm install source-js-minifierNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Downloads example.com, minifies and concatenates all JS, minifies CSS, and opens result in browser.
Do not use in production. Evaluate alternatives like terser or html-minifier.
Use Node.js >= 18 or add type: 'module' to package.json, or use dynamic import.
Ensure ./output/ is empty or backed up before running.
Validate URL manually and ensure network connectivity.
Use Node.js >= 18 or add type: 'module' to package.json, or downgrade node-fetch to v2.
Use `const fetch = (...args) => import('node-fetch').then(({default: fetch}) => fetch(...args));`