{"id":16643744,"url":"https://github.com/josee9988/minifyall","last_synced_at":"2026-02-27T17:35:15.270Z","repository":{"id":35820838,"uuid":"196566728","full_name":"Josee9988/MinifyAll","owner":"Josee9988","description":"A 𝗩𝗦𝗖𝗼𝗱𝗲 𝗺𝗶𝗻𝗶𝗳𝗶𝗲𝗿 for JS, JSON/C, CSS, and HTML, you will love its simplicity! 🌟 𝘾𝙤𝙢𝙥𝙧𝙚𝙨𝙨 and 𝙜𝙯𝙞𝙥 files and folders 📦 Reduce your bundle and file sizes with lightning speed ⚡","archived":false,"fork":false,"pushed_at":"2025-01-16T22:19:56.000Z","size":27413,"stargazers_count":73,"open_issues_count":49,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T19:09:01.938Z","etag":null,"topics":["css","extension","json","minification","minifier","minify","minify-css","minify-html","minify-javascript","minify-js","minifying-files","minimization","typescript","uglification","uglifier","visual-studio-code","vscode","vscode-extension","vscode-extensions","vscode-plugin"],"latest_commit_sha":null,"homepage":"https://minifyall.jgracia.es/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Josee9988.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null},"funding":{"github":"Josee9988","custom":["https://www.paypal.me/josee9988"]}},"created_at":"2019-07-12T11:20:55.000Z","updated_at":"2025-03-29T20:28:18.000Z","dependencies_parsed_at":"2023-01-16T07:03:07.889Z","dependency_job_id":null,"html_url":"https://github.com/Josee9988/MinifyAll","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Josee9988%2FMinifyAll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Josee9988%2FMinifyAll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Josee9988%2FMinifyAll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Josee9988%2FMinifyAll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Josee9988","download_url":"https://codeload.github.com/Josee9988/MinifyAll/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595335,"owners_count":20963943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","extension","json","minification","minifier","minify","minify-css","minify-html","minify-javascript","minify-js","minifying-files","minimization","typescript","uglification","uglifier","visual-studio-code","vscode","vscode-extension","vscode-extensions","vscode-plugin"],"created_at":"2024-10-12T08:09:25.734Z","updated_at":"2026-02-27T17:35:10.221Z","avatar_url":"https://github.com/Josee9988.png","language":"TypeScript","readme":"\u003c!-- markdownlint-disable MD033--\u003e\n# **MinifyAll an extension for VS Code**\n\nSimple VS Code **minifier** and **compressor** for most common file types ([See full list below](#languages-available-)). You will love its simplicity!\n\nYou can minify the file and replace all the content with the new minified text, **or** you can preserve the original document and get the minified text in another document! Also, you can simply minify your **selected text**, and you can preserve your license comments with the tags *@preserve* and *@endpreserve*.\n\nMinifyAll is also able to **compress** files and folders simply by right-clicking them on the menu.\n\nGo to the extension *settings* and make it as you want, enable or disable: **minify on save**, **languages**, **hexadecimal shortener**, **messages**, and much more.\n\nFor more information check our: **[GitHub repository](https://github.com/Josee9988/MinifyAll)**, **[VisualStudio Marketplace](https://marketplace.visualstudio.com/items?itemName=josee9988.minifyall)** or **[OpenVSX registry](https://open-vsx.org/extension/Josee9988/minifyall)**.\n\nAlso check the brand new **[MinifyAll online webpage](https://minifyall.jgracia.es/)** 😎 or the **[MinifyAllCli/package](https://github.com/Josee9988/MinifyAllCli)**.\n\nDo you want to help us improve the extension or did you find a bug?\n**[Let us know](https://github.com/Josee9988/MinifyAll/issues)**.\n\nCheck our **[CHANGELOG](CHANGELOG.md)**.\n\nCurrently looking for active contributors to maintain and keep the project alive.\n\n\u003e We support up to **14** languages/file extensions!\n\n---\n\n[![Version](https://vsmarketplacebadge.apphb.com/version-short/josee9988.minifyall.svg?style=for-the-badge\u0026logo)](https://marketplace.visualstudio.com/items?itemName=josee9988.minifyall)\n[![Downloads](https://vsmarketplacebadge.apphb.com/downloads/josee9988.minifyall.svg?style=for-the-badge\u0026logo)](https://marketplace.visualstudio.com/items?itemName=josee9988.minifyall)\n[![Rating](https://vsmarketplacebadge.apphb.com/rating-star/josee9988.minifyall.svg?style=for-the-badge\u0026logo)](https://marketplace.visualstudio.com/items?itemName=josee9988.minifyall)\n[![GitHub commit activity](https://img.shields.io/github/commit-activity/y/Josee9988/minifyall.svg?style=popout-square)](#minifyall-an-extension-for-vscode)\n![CI](https://img.shields.io/github/workflow/status/Josee9988/MinifyAll/CodeQL.svg)\n\n---\n\n## **Installation** 🔩⚙\n\n- Open the **Command Palette** of VS Code with **Ctrl+P** or **⌘P**\n- And type:➡️\n**```ext install josee9988.minifyall```**\n\n### **Commands** 📐🛡\n\n- **```Minify this document ⚡``` Or ```CTRL+ALT+M```**\n- **```Minify this document and preserve the original ⛏``` Or ```CTRL+ALT+N```**\n- **```Minify the selected text 🎯``` Or ```CTRL+ALT+. CTRL+ALT+M```**\n\nWe recommend using them with: \"left click\" on the document and then select the option you want, either the file in the menu or the opened file. ;)\n\n---\n\n## **How does it look with real code?** 📸 😁\n\n- The two commands available. First, directly minifies the actual document and replaces the original code with the modified one, the second keeps the original document and creates a file with the modified text:\n\n\u003cimg src=\"https://github.com/Josee9988/MinifyAll/blob/master/Screenshots/command.png?raw=true\" alt=\"command\" title=\"command\"/\u003e\n\n- Preserve your licence comments with the tags *@preserve* (at the very top) and *@endpreserve*\n\n\u003cimg src=\"https://github.com/Josee9988/MinifyAll/blob/master/Screenshots/Preserve.gif?raw=true\" alt=\"preserve license\" title=\"preserve license\"/\u003e\n\n- The first and default command that replaces the actual code with the minified one:\n\n\u003cimg src=\"https://github.com/Josee9988/MinifyAll/blob/master/Screenshots/Preview.gif?raw=true\" alt=\"preview\" title=\"preview\"/\u003e\n\n- The second command that saves the minified text to another file and preserves the original text:\n\n\u003cimg src=\"https://github.com/Josee9988/MinifyAll/blob/master/Screenshots/Preview2ndcommand.gif?raw=true\" alt=\"preview2nd\" title=\"preview2nd\"/\u003e\n\n- Minify only your **selected text**!\n\n\u003cimg src=\"https://github.com/Josee9988/MinifyAll/blob/master/Screenshots/SelectedText.gif?raw=true\" alt=\"selectedText\" title=\"selectedText\"/\u003e\n\n- Also, minify when right-clicking on the code!\n\n\u003cimg src=\"https://github.com/Josee9988/MinifyAll/blob/master/Screenshots/RightClick.png?raw=true\" alt=\"rightclickMenu\" title=\"rightclickMenu\"/\u003e\n\n- Minify when right-clicking on a file of the menu without opening it!\n\n\u003cimg src=\"https://github.com/Josee9988/MinifyAll/blob/master/Screenshots/RightClickMenu.gif?raw=true\" alt=\"rightclickInAction\" title=\"rightclickInAction\"/\u003e\n\n- Compress when right-clicking on a file or folder of the menu.\n\n\u003cimg src=\"https://github.com/Josee9988/MinifyAll/blob/master/Screenshots/compress.gif?raw=true\" alt=\"compressfiles\" title=\"compressfiles\"/\u003e\n\n---\n\n## **Languages available** 🧪🔥\n\n- **CSS**\n- **HTML**\n- **XML**\n- **TWIG**\n- **VUE**\n- **VUE-HTML**\n- **HTML** in a *PHP file*\n- **JSON**\n- **JavaScript** With: [Terser](https://github.com/terser/terser)\n- **JavaScriptReact** With: [Terser](https://github.com/terser/terser)\n- **JSONC**\n- **LESS**\n- **SASS**\n- **SCSS**\n\n---\n\n## **Configuration settings** ⚙️⛓\n\n\u003c!-- markdownlint-disable no-inline-html--\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to see more info about the configuration settings\u003c/summary\u003e\n\n(Remember to restart VS Code after modifying any configuration)\n\n- If you want MinifyAll to **stop shortening colours**, such as RGB to 3-digit hex, RGBA to hex, or 6-digit hex to 3-digit hex. If you enable it, you might see some loss in colour accuracy\n\n``` json\n\"MinifyAll.disableHexadecimalShortener\": true|false //default 'true' (by default, it is disabled)\n```\n\n- Disables warning and information messages\n\n``` json\n\"MinifyAll.disableMessages\": true|false //default 'false' (by default, it is allowed)\n```\n\n- Disables context menu when right-clicking in your code.\n\n``` json\n\"MinifyAll.disableCodeContextMenu\": true|false //default 'false' (by default, it is shown)\n```\n\n- Disables context menu when right-clicking in the file explorer.\n\n``` json\n\"MinifyAll.disableFileExplorerContextMenu\": true|false //default 'false' (by default, it is shown)\n```\n\n- Minify on save (Default command, which will minify your actual code)\n\n``` json\n\"MinifyAll.minifyOnSave\": true|false //default 'false' (by default, it is disabled)\n```\n\n- Minify on save (Second command, which will minify your actual code into a new file)\n\n``` json\n\"MinifyAll.minifyOnSaveToNewFile\": true|false //default 'false' (by default, it is disabled)\n```\n\n- Prefix the new minified file from the command that minifies to another doc.\n\n``` json\n\"MinifyAll.PrefixOfNewMinifiedFiles\": '-min'|'.min'|'-minified'|'.minified' //default '-min'\n```\n\n- If you want MinifyAll to open the new minified document after you minify. (False for not opening it whenever you create a minified file).\n\n``` json\n\"MinifyAll.openMinifiedDocument\": true|false //default 'true'\n```\n\n- Terser minify options, this setting will allow you to fully customize your Terser behaviour. For more info, please check [terser's minify options](https://github.com/terser/terser#minify-options).\n\n``` json\n\"MinifyAll.terserMinifyOptions\": { \"mangle\": true, \"compress\": { \"drop_console\": true, \"dead_code\": false, \"keep_fnames\": false, \"keep_classnames\": false } } // for more information please visit https://github.com/terser/terser#minify-options\n```\n\n### **Disabling languages configuration**\n\n- Disables **HTML** minimization\n\n``` json\n\"MinifyAll.disableHtml\": true|false //default 'false' (by default, it is enabled)\n```\n\n- Disables **TWIG** minimization\n\n``` json\n\"MinifyAll.disableTwig\": true|false //default 'false' (by default, it is enabled)\n```\n\n- Disables **PHP** minimization\n\n``` json\n\"MinifyAll.disablePhp\": true|false //default 'false' (by default, it is enabled)\n```\n\n- Disables **CSS** minimization\n\n``` json\n\"MinifyAll.disableCss\": true|false //default 'false' (by default, it is enabled)\n```\n\n- Disables **SCSS** minimization\n\n``` json\n\"MinifyAll.disableScss\": true|false //default 'false' (by default, it is enabled)\n```\n\n- Disables **LESS** minimization\n\n``` json\n\"MinifyAll.disableLess\": true|false //default 'false' (by default, it is enabled)\n```\n\n- Disables **SASS** minimization\n\n``` json\n\"MinifyAll.disableSass\": true|false //default 'false' (by default, it is enabled)\n```\n\n- Disables **JSON** minimization\n\n``` json\n\"MinifyAll.disableJson\": true|false //default 'false' (by default, it is enabled)\n```\n\n- Disables **JSONC** minimization\n\n``` json\n\"MinifyAll.disableJsonc\": true|false //default 'false' (by default, it is enabled)\n```\n\n- Disables **JavaScript** minimization //default 'true' (by default, it is disabled because it is not on a stable version yet)\n\n``` json\n\"MinifyAll.disableJavascript\": true|false //default 'false' (by default, it is enabled)\n```\n\n- Disables **JavaScriptReact** minimization //default 'true' (by default, it is disabled because it is not on a stable version yet)\n\n``` json\n\"MinifyAll.disableJavascriptReact\": true|false //default 'true' (by default, it is enabled)\n```\n\n- Disables **XML** minimization //default 'false'\n\n``` json\n\"MinifyAll.disableXml\": true|false //default 'false'\n```\n\n\u003c/details\u003e\n\n---\n\n## **Examples**\n\n### **CSS LESS SASS SCSS**\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to see an example of how the extension minifies CSS\u003c/summary\u003e\n\n*From:*\n\n```css\n.myClass {\n    background-color: rgba(12, 12, 12, 0.8);\n    background-color: rgb(12, 12, 12);\n    background-color: #FAFAFA;\n    /*other comment*/\n    content: url(\"https://github.com/Josee9988/MinifyAll\");\n    margin-right: 0px;\n}/* my comment\n    */\n```\n\n*To:*\n\n```css\n.myClass{background-color:#0C0C0CCC;background-color:#111;background-color:#FFF;content:url(\"https://github.com/Josee9988/MinifyAll\");margin-right:0}\n```\n\n- RGBA is formatted to hexadecimal.\n- RGB is formatted to a 3-digit hexadecimal value.\n- 6-digit hexadecimal values are formatted to 3-digit hexadecimal values.\n- There are no spaces.\n- There is only one line.\n- Multiline comments removed.\n- URL '//' is not detected as a comment and can be perfectly placed.\n- From 0px to 0\n\n---\n\n\u003c/details\u003e\n\n### **JSON JSON**\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to see an example of how the extension minifies JSON\u003c/summary\u003e\n\n*From:*\n\n``` json\n{\n\"contributes\": {\n\"commands\": [{\n\"title\": \"Minify this document ⚡\",\n},\n{\n\"color\": \"#FAFAFA\", // comments\n}/* multiline comment\n*/\n]\n}\n}\n```\n\n*To:*\n\n``` json\n{\"contributes\":{\"commands\":[{\"title\":\"Minify this document ⚡\"},{\"color\":\"#FFF\"}]}}\n```\n\n- Only one line.\n- No unnecessary spaces.\n- 6 Digit hex to 3 digit hex.\n- No single-line comments.\n- No multiline comments.\n- Removed trailing comma before '}'.\n\n---\n\n\u003c/details\u003e\n\n### **JavaScript**\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to see an example of how the extension minifies JavaScript\u003c/summary\u003e\n\n*From:*\n\n```javascript\n\"use strict\";\nconst {\n    commands,\n    window\n} = require('vscode');\nconst FileSaver = require('fs')\nconst StringWithComments = \"// not a comment /*\" //this is my comment\nif ((window.activeTextEditor.document.languageId == \"css\" \u0026\u0026 disableCss == false) || //myComment\n    (window.activeTextEditor.document.languageId == \"scss\" \u0026\u0026 disableScss == false)) {\n    const {\n        document\n    } = window.activeTextEditor;\n    switch (window.activeTextEditor.document.languageId) {\n        case \"css\":\n            /*\n            multi-line comments\n            */\n            console.log(\"Love this minifier !!!\")\n            break;\n        default:\n            break;\n    }\n}\n```\n\n*To:*\n\n```javascript\n\"use strict\";const{commands,window}=require('vscode');const FileSaver=require('fs')\nconst StringWithComments=\"// not a comment /*\"\nif((window.activeTextEditor.document.languageId==\"css\"\u0026\u0026disableCss==false)||(window.activeTextEditor.document.languageId==\"scss\"\u0026\u0026disableScss==false)){const{document}=window.activeTextEditor;switch(window.activeTextEditor.document.languageId){case\"css\":console.log(\"Love this minifier !!!\")\nbreak;default:break;}}let myString=\"hello//\";myString.replace(/\\/\\//g,'');\n```\n\n- Only changes line if, at the end of a declaration or an import, that line does not end in ';' (So adding more ';' at the end of every line will help you minimize more your code).\n- All irrelevant spaces removed.\n- Spaces left are only within quotes (Strings) and variable declarations.\n- If 'OR' and 'AND' are without spaces, the same as if condition or switch cases.\n- All single line and multiline comments removed.\n- Single line comments inside a String will not be removed. (hello//) (// not a comment).\n- Multi-line comments inside a String will not be removed. (// not a comment **/\\***).\n- Regex expression with single-line comments will not be removed.\n- No tabs.\n\n---\n\n\u003c/details\u003e\n\n### **HTML**\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to see an example of how the extension minifies HTML\u003c/summary\u003e\n\n*From:*\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"es\"\u003e\n\n\u003chead\u003e\n    \u003ctitle\u003e\u003c/title\u003e\n    \u003cmeta charset=\"utf-8\"\u003e\n    \u003clink rel=\"stylesheet\" href=\"\"\u003e\n    \u003cscript type=\"text/javascript' src=\"\"\u003e\u003c/script\u003e\n    \u003c!-- test --\u003e\n\u003c/head\u003e\n\n\u003c!-- ~~~~~✦✦✦✦✦ B O\n D Y ✦✦✦✦✦~~~~~ --\u003e\n\u003cbody\u003e\n\n\u003c/body\u003e\n\n\u003c/html\u003e\n```\n\n*To:*\n\n```html\n\u003c!DOCTYPE html\u003e\u003chtml lang=\"es\"\u003e\u003chead\u003e\u003ctitle\u003e\u003c/title\u003e\u003cmeta charset=\"utf-8\"\u003e\u003clink rel=\"stylesheet\"href=\"\"\u003e\u003cscript type=\"text/javascript\"src=\"\"\u003e\u003c/script\u003e\u003c/head\u003e\u003cbody\u003e\u003c/body\u003e\u003c/html\u003e\n```\n\n- Only one line.\n- Only the necessary spaces.\n- No tabs.\n- No single-line comments.\n- No multiline comments.\n\n---\n\n\u003c/details\u003e\n\n---\n\n## **Known bugs:** 🛑🗑\n\n- ⚠️ If the file you are trying to minify is **not saved** or is an Untitled default VS Code file *might* cause errors.\n- ⚠️ If you are doing a regex without escaping the '//' it might be deleted as it must be escaped (\\/\\/).\n\n---\n\n## 🥰 Donators\n\nSupport the project and be the first donator ❤️\n\n---\n\n## 🎉 Did you enjoyed the minifier? Help us raise these numbers up\n\n[![GitHub followers](https://img.shields.io/github/followers/Josee9988.svg?style=social)](#did-you-enjoyed-the-minifier-help-us-raise-these-numbers-up--)\n[![GitHub stars](https://img.shields.io/github/stars/Josee9988/MinifyAll.svg?style=social)](#did-you-enjoyed-the-minifier-help-us-raise-these-numbers-up--)\n[![GitHub watchers](https://img.shields.io/github/watchers/Josee9988/MinifyAll.svg?style=social)](#did-you-enjoyed-the-minifier-help-us-raise-these-numbers-up--)\n[![GitHub forks](https://img.shields.io/github/forks/Josee9988/MinifyAll.svg?style=social)](#did-you-enjoyed-the-minifier-help-us-raise-these-numbers-up--)\n[![Sponsor](https://img.shields.io/static/v1?label=Sponsor\u0026message=%E2%9D%A4\u0026logo=github-sponsors\u0026color=red\u0026style=social)](https://github.com/sponsors/Josee9988)\n\n[Check my VS Code theme](https://marketplace.visualstudio.com/items?itemName=josee9988.black-garnet-theme) 🧲\n\n[Check my VS Code Markdown and Changelog snippets](https://marketplace.visualstudio.com/items?itemName=josee9988.changelog-and-markdown-snippets) 🌟\n\n[Check my MinifyAll online webpage](https://minifyall.jgracia.es/) 😎\n\n[Check my MinifyAllCli/package](https://github.com/Josee9988/MinifyAllCli)\n\n---\n\n## 📚 **Posts where MinifyAll is mentioned**\n\n- [Minify Code Automatically](https://dev.to/aryaziai/minifying-code-shortcut-4d6c)\n- [How I made my website 10x faster](https://dev.to/asaoluelijah/how-i-made-my-personal-website-10x-faster-3p6k)\n- [11 plugins indispensables para VS Code](https://www.gitmedio.com/11-plugins-indispensables-para-visual-studio-code-insiders/)\n- [6 VS Code extensions you need to install now](https://it-it.facebook.com/AskHorizons/photos/a.128334975253236/386218132798251/?type=3\u0026eid=ARDn_eorUZWvdCAV4C9taXZ5FFXu7Ib4e80xgui_LS-2y_m6VegoeCrc1JfFt6Bbyy7rXjEnPPSHCqTt)\n- [8 VS Code common extensions (Chinese)](https://www.leunghoyin.hk/vscode-common-extensions)\n\n---\n\n\u003e ⚠️Remember that this extension does not guarantee 100% effectiveness and may have some issue at some point. Use it at your own risk and always do backups of your code.⚠️\n\n_Made with a lot of ❤️❤️ by **[@Josee9988](https://github.com/Josee9988)**_\n","funding_links":["https://github.com/sponsors/Josee9988","https://www.paypal.me/josee9988"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosee9988%2Fminifyall","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosee9988%2Fminifyall","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosee9988%2Fminifyall/lists"}