app/_templates/code_example_renderers/jsx_renderer.rb
require "babel/transpiler"
Hologram::CodeExampleRenderer::Factory.define "jsx" do
example_template "jsx_example_template"
lexer { Rouge::Lexer.find("js") }
rendered_example do |code|
Babel::Transpiler.transform(code.strip)["code"]
end
end