This is example usage of triggers in simple-ftp-deploy plugin for Sublime Text which automatically minifies javascript and css files using css-html-js-minify library, or alternativelly, using some CLI minifier, like minify.
Basically, minifier is called on save of any .css or .js file and .min.css or .min.js file is also automatically uploaded to server. And also, .min.css and .min.js file is deleted from server when you delete origin .css or .js file.