Skip to content

Instantly share code, notes, and snippets.



Last active Mar 4, 2017
What would you like to do?
Sublime Text 3 Plugin to Minify JS & CSS files on save (requires bistory's Sublime Minifier here:
import sublime, sublime_plugin
class MinifyOnSave(sublime_plugin.EventListener):
def on_post_save(self, view):
file_types_to_minify = ['js', 'css']
filenameParts = view.file_name().split('.')
if filenameParts[len(filenameParts) - 1] in file_types_to_minify:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.