CaffeineOnIce / AutoMinify

A VSCode extension to minify HTML, CSS and JS files.
https://marketplace.visualstudio.com/items?itemName=CaffeineOnIce.autominify
MIT License
2 stars 1 forks source link
html-css-javascript vscode-extension

Auto Minify Extension for VSCode

Automatically minify your HTML, CSS, and JS files to optimize space and bandwidth usage.

Features

Basic Usage

  1. Create an .html, .css, or .js file.
  2. Press Ctrl/Cmd + S to save your file.
  3. A corresponding .min.html, .min.css, or .min.js file is automatically generated.
  4. You will see a temporary "HTML Compiled," "CSS Compiled," or "JS Compiled" message in the status bar.

Dependencies Utilized

Please check the changelog for version updates.

Heads-Up

Note: Any additional options not provided below are defaulted to their respective values in their original code.

html-minifier-terser Options Utilized:

{
    "removeAttributeQuotes": true,
    "removeComments": true,
    "removeEmptyElements": true,
    "removeOptionalTags": true,
    "removeRedundantAttributes": true,

    "collapseWhitespace": true,
    "conservativeCollapse": true,

    "caseSensitive": true,
    "continueOnParseError": true,
    "collapseBooleanAttributes": true,
    "processConditionalComments": true,

    "minifyCSS": true,
    "minifyJS": true,
    "html5": true
}

clean-css Options Utilized:

{
    "level": {
        "1": {
            "all": true
        }
    }
}

terser Options Utilized:

{
    "mangle": false
}