add method to inject server side variables into js files