add XTemplate to builder.rb

extract xtemplate from html and insert into js as string