ToptalMinifier
Minify CSS and JavaScript using Toptal's online minifier APIs.
Details
Installs
- Total 3
- Win 3
- Mac 0
- Linux 0
| May 7 | May 6 | May 5 | May 4 | May 3 | May 2 | May 1 | Apr 30 | Apr 29 | Apr 28 | Apr 27 | Apr 26 | Apr 25 | Apr 24 | Apr 23 | Apr 22 | Apr 21 | Apr 20 | Apr 19 | Apr 18 | Apr 17 | Apr 16 | Apr 15 | Apr 14 | Apr 13 | Apr 12 | Apr 11 | Apr 10 | Apr 9 | Apr 8 | Apr 7 | Apr 6 | Apr 5 | Apr 4 | Apr 3 | Apr 2 | Apr 1 | Mar 31 | Mar 30 | Mar 29 | Mar 28 | Mar 27 | Mar 26 | Mar 25 | Mar 24 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 0 | 1 | 1 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
ToptalMinifier
ToptalMinifier is a Sublime Text package that minifies CSS and JavaScript using Toptal's online minifier APIs.
It can minify the current selection or the whole file, then replace the content in place, open the result in a new tab, or copy it to the clipboard.
Privacy note
This package sends the selected code or current file content to Toptal's online minifier APIs.
Do not use this package for private, sensitive, licensed, or proprietary source code unless you are allowed to send that code to a third-party service.
Features
- Minify CSS using Toptal CSS Minifier
- Minify JavaScript using Toptal JavaScript Minifier
- Works with selected text or the full current file
- Minify in place
- Minify to a new view
- Minify to clipboard
- Command Palette entries
- Tools menu entries
- Package settings menu
Installation
Package Control
Once accepted into Package Control:
- Open the Command Palette.
- Run
Package Control: Install Package. - Search for
ToptalMinifier. - Press Enter.
Manual install
Clone this repository into your Sublime Text Packages directory:
git clone https://github.com/bkader/ToptalMinifier.git ToptalMinifier
Do not include package-metadata.json in a manual install. Package Control generates that file for managed packages.
Usage
Open a CSS or JavaScript file, then run one of these commands from the Command Palette:
Toptal Minifier: Minify Current CSS/JS In PlaceToptal Minifier: Minify Current CSS/JS To New ViewToptal Minifier: Minify Current CSS/JS To ClipboardToptal Minifier: Minify As CSS In PlaceToptal Minifier: Minify As JavaScript In Place
The same commands are also available from:
Tools > Toptal Minifier
Optional key binding
ToptalMinifier does not install a default key binding.
To add one, open:
Preferences > Key Bindings
Then add this to your user key bindings:
[
{
"keys": ["ctrl+alt+shift+m"],
"command": "toptal_minifier_replace"
}
]
On macOS, use:
[
{
"keys": ["super+alt+shift+m"],
"command": "toptal_minifier_replace"
}
]
Settings
Open:
Preferences > Package Settings > ToptalMinifier > Settings
Available settings:
{
"timeout_seconds": 30,
"user_agent": "Sublime Text Toptal Minifier",
"javascript_config": null
}
JavaScript config
The javascript_config setting is forwarded to Toptal's JavaScript Minifier API as the config field.
Example:
{
"javascript_config": {
"minify": true,
"jsc": {
"target": "es2022"
}
}
}
Requirements
- Sublime Text 4
- Internet access
License
MIT