7

I'm new to this idea but i was just wondering if there is a way or tool to automate certain tasks before deploying my website. i would like to do the following tasks with one go:

  • minify all JS used
  • minify the CSS
  • minify all HTML and PHP
  • create these as a copy of the files before actually doing these so that they don't destroy the original source
Joseph
  • 117,725
  • 30
  • 181
  • 234

3 Answers3

5

There's a whole slew of tools, frameworks and packages that deal with problems you described. In general, they fall into a category of build automation, so you might start with that.

Minification can be easily performed during a build process by a build server.

Deployment however is a huge topic in and of itself and there are various tools as well to aid you with Capistrano being seemingly the most popular one.

Anton Gogolev
  • 113,561
  • 39
  • 200
  • 288
  • It seems that this tutorial is meant specifically for PHP applications: http://mathew-davies.co.uk/2009/10/28/php-deployment.html – Andrei Bârsan Mar 11 '12 at 07:33
2

While you are at it, take a look at my guide on writing your first Capistrano recipe:

http://guides.beanstalkapp.com/deployments/deploy-with-capistrano.html

I hope you will find it useful!

Ilya Sabanin
  • 786
  • 5
  • 9
0

The tasks you describe have more to do with general file processing and backup tasks rather than deployment. Any good scripting language will do for that (Ruby, Perl, etc.).

For actually automating deployment of web applications (which can also incorporate your file processing tasks), take a look at Capistrano:

https://github.com/capistrano/capistrano

Mark Fraser
  • 3,160
  • 2
  • 29
  • 48