Skip to content

Instantly share code, notes, and snippets.

@jeremypeter
Last active December 11, 2015 03:58
Show Gist options
  • Save jeremypeter/4541283 to your computer and use it in GitHub Desktop.
Save jeremypeter/4541283 to your computer and use it in GitHub Desktop.
Sublime Text build system for Premailer. Creates a separate html or txt version with option to minify them once they have been converted.
[
{ "keys": ["ctrl+alt+super+c"], "command": "build", "args": {"variant": "Premailer - Inline Campaign Monitor"} },
{ "keys": ["ctrl+alt+super+m"], "command": "build", "args": {"variant": "Premailer - Minify HTML"} },
{ "keys": ["ctrl+alt+super+t"], "command": "build", "args": {"variant": "Premailer - Create Text Version"} }
]
{
"cmd": ["premailer"],
"variants": [
{
"cmd": ["premailer $file_name > email.html"],
"name": "Premailer - Inline Styles"
},
{
"cmd": ["premailer --mode txt $file_name > email.txt"],
"name": "Premailer - Create Text Version"
},
{
"cmd": [
"java",
"-jar", "${packages}/HTML Compressor/bin/htmlcompressor-1.5.3.jar",
"--type", "html",
"--remove-quotes",
"--compress-js",
"--compress-css",
"-o", "$file_name",
"$file"
],
"name": "Premailer - Minify HTML",
"shell": false
}
],
"selector": "source.html",
"shell": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment