Search code examples
compressionweb-deploymentminimization

script for deploying a web app


I was wondering why there are no ftp clients that have the following options usefully for deploying:

  • minimize .js, .css and .html files
  • gzip .js, .css and .html

I tried with transmit for mac os x, as well as cyberduck, but non have this functionality. Even springloops don't offer this (see https://twitter.com/springloops/status/469396427660345344)

So my idea was to make a shell script to:

  1. minimize
  2. gzip
  3. transfer via sftp to the server

But I can't imagine there isn't already someone that made this. My problem is: I don't know exactly how this would be called , so it's difficult to search for it.

Does anyone knows such a script? Or why is this functionality not so common?


Solution

  • After a lot of research and trying things out, I found Grunt.js http://gruntjs.com/getting-started

    It looks very promising. There are plugins for minimizing, gzip, and sftp (https://www.npmjs.org/package/grunt-sftp-deploy)

    The examples of Grunt are very clear to follow, and easy to understand and to adapt.