Page 1 of 1

Javascript Reduction

Posted: 01 Dec 2025, 23:02
by The-10-Pen
Does anyone know of any freebie third-party tools that will take a folder of miscellaneous file types and subfolders within subfolders of miscellaneous file types and perform a "task" on all .js files and "shrink" / "compress" them in the sense of removing all "white space"?

Thanks in advance.

Javascript Reduction

Posted: 02 Dec 2025, 00:02
by teknixstuff
You'll need node.js, then run this in cmd:

Code: Select all

for %i in (*.js) do (npx minify < "%~fi" > "%~fi.out" & move /y "%~fi.out" "%~fi")

Javascript Reduction

Posted: 02 Dec 2025, 09:33
by The-10-Pen
Awesome! Working perfectly. Many thanks.