olback / es6-css-minify

Easily minify CSS and JavaScript in VS Code
https://marketplace.visualstudio.com/items?itemName=olback.es6-css-minify
MIT License
47 stars 13 forks source link

How to compress folder into one file? #143

Closed notaprofi closed 2 years ago

notaprofi commented 2 years ago

I'm new into js-minification and is confused how to use your extention. Is there is a way to compress several js files into one file with es6-css-minify? Is there to do it automatically on save?

Also, is there a good example of .uglifyrc file? By default the extension doesn't seem to minify optimally, for example it doesn't minify local variable names.

Also, is there a way to minify into another folder, but preserve the initial subfolder structure? I.e. js/one/one.js should be saved into min/one/one.min.js and js/two/two.js should be saved into min/two/two.min.js at the moment if it set min as a minification folder both files end up to be min/one.min.js and min/two.min.js, which can lead to some name collisions.

Thank you!

olback commented 2 years ago

Hi,

This extension is mostly for single files or small project where each file is separate. It sound like you want a proper Javascript build system. There are plenty of popular, well-maintained solutions, just to name a few: webpack and babel.

Also, is there a way to minify into another folder, but preserve the initial subfolder structure?

No.

Also, is there a good example of .uglifyrc file?

Not that I know of.