Compressed Code is a Visual Studio Code extension that allows you to easily compress or decompress the contents of HTML, JavaScript, and CSS files. It simplifies your code by removing extra whitespaces and unnecessary new lines for optimized performance or formatting them for better readability.
Features
Compress Files: Removes all unnecessary whitespaces and line breaks from your HTML, JavaScript, and CSS files to minimize file size.
Decompress Files: Reformats compressed files by adding appropriate line breaks and indentations, making them easier to read and modify.
How to Use
Open an HTML, JavaScript, or CSS file in Visual Studio Code.
Use the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on macOS) and search for:
Compress File: To compress the file.
Decompress File: To decompress the file.
Alternatively, you can bind these commands to custom keyboard shortcuts in your VS Code keybindings settings.
Commands
compressed-code.compress: Compresses the active HTML, JavaScript, or CSS file.
compressed-code.decompress: Decompresses the active HTML, JavaScript, or CSS file.
Supported File Types
.html
.js
.css
Installation
Open Visual Studio Code.
Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window.