[eluser]CroNiX[/eluser]
Never needed to do this. I set all dynamic js vars in the head of my document (which is a php template, so I can use php there), like base_url, so that my separate, pure js files can use them. Same with dynamic css rules.
You can also set your server up to parse js and css files as php and use appropriate headers when sending the data out, although that makes your server have to process more things. There are many guides on the net how to set that up.