What would best practice be however? I assume best practice would be use a JSP or Ecma to generate a dynamic JS file. Sightly is defined as being an HTML templating system right, so if you aren't generating HTML shouldn't you be using a different templating language?