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

Dont work with Live Sass Compiler ext #102

Closed marcellopagano closed 4 years ago

marcellopagano commented 4 years ago

When I try to your extension using it from visual studio code with "Live Sass Compiler ext" enabling "watch sass" I only get the updated css while the min.css is not updated correctly, while if I go to the css file and save then the min.css file is updated, I confirm that I have changed "es6-css-minify.minifyOnSave": "yes"

Desktop information:

olback commented 4 years ago

JS & CSS Minifier does not react to file changes, only save events. So when Live Sass compiler saves a new version/file, JS & CSS Minifier does not get notified. If you want minified output from Live Sass Compiler you could add the following to your .vscode/settings.json:

{
    "liveSassCompile.settings.formats": [
        {
            "format": "compressed",
            "extensionName": ".min.css",
            "savePath": null
        }
    ]
}
marcellopagano commented 4 years ago

Thanks for the tip, I would like to know if there is a substantial difference between the (CSS) compression done by "Live sass compiler" and "JS & CSS Minifier (Minify)", I apologize again if the question is a little off topic.

olback commented 4 years ago

That's a good question. I think Live Sass Compiler has similar settings to clean-css which is used by 'JS & CSS Minifier'.

marcellopagano commented 4 years ago

Thanks again for your time, good job.