0

I work in a small development team where we use version control but one of the real bug bears for us is that our development paths are different from our live web platforms paths.

So when we are developing projects on our own machine we are constantly having to comment in and out live/development paths, especially in our CSS files as the paths for our images folder are different development to live.

I thought this would be simple enough to set the paths accordingly using the CGI.HTTP_HOST variable but because the image paths are set in our CSS files is there a way to do this?

I wasn't sure if using JavaScript to determine if we were on our localhost machine and then setting two variables; one for development path and one for live path would be best but then O was unsure how to use these variables in the CSS style path?

Hope this makes sense!

CPB07
  • 679
  • 3
  • 13
  • 23

1 Answers1

0

You should setup a build process using ant. With ant, you can process your files and define different build targets, e.g., local or production and replace the paths in your css files (any many many things more) automatically. Ant files can be executed by Eclipse without additional extensions. The different paths etc. are defined in so-called properties-files.

strauberry
  • 4,189
  • 5
  • 34
  • 50