Sublime Text 2 Plugin which perform a custom action after saving a file
Install it via Package Manager
Adding a simple comment at the top of the file in which you want to trigger a command.
Example:
/* aftersave: uglifyjs <self> -o ../public/js/main.js */
(function($){
$(document).on('ready', function(event) {
alert('Document is ready!');
});
})(jQuery);
<self> is automatically replaced by the current file name.
It probably won't work in Windows.