I'm using npm scripts to compile and minify sass and potentionally javascript files.
However, I'm looking for at way to specify a source folder of *.js files and have them minified and saved in a destination folder individually - (flattened, not concatenated) each as *.min.js.
I have tried with npm terser, but it doesn't seem to be able to with with a source folder, only single files, nor does it seem to be able to minify the files individually.
So, what I'm looking for:
Src/
|__main.js
|__menu.js
|__etc...
Dist/
|__main.min.js
|__menu.min.js
|__...
Which npm package should I use for this?
So, it seems that the package Terser folder can do just this...