compile html to js for artTemplate