Javascript code generator inspired by Apache velocity