Language agnostic configuration tools?
I'm starting out at web development and I've written some CGI scripts, html, javascript, and css. They all refer to variables in each other, and I'd like to keep them all in tune. If I were writing in just one language (which is all I've ever done before), I could do something like:
#define MYCONSTANT 1 But that obviously won't work across 4 or more files written in 4 or more languages. Any suggestions? |
If you use PHP instead of CGI, you could define constants (macro's) to use in all of: PHP, html, javascript and, with a bit of fiddling, also CSS.
You would write this instead though: Code:
define('MYCONSTANT', 1); |
I would suggest looking at a generic macro (pre-)processor, such as GNU m4.
|
Thanks, M4 looks like what I'm looking for.
|
Quote:
--Jonas |
All times are GMT -5. The time now is 05:46 PM. |