Module: React::JSX

Defined in:
lib/react/jsx.rb,
lib/react/jsx/template.rb,
lib/react/jsx/jsx_transformer.rb,
lib/react/jsx/babel_transformer.rb

Defined Under Namespace

Classes: BabelTransformer, JSXTransformer, Template

Constant Summary collapse

DEFAULT_TRANSFORMER =
BabelTransformer

Class Method Summary collapse

Class Method Details

.transform(code) ⇒ Object



18
19
20
21
# File 'lib/react/jsx.rb', line 18

def self.transform(code)
  self.transformer ||= transformer_class.new(transform_options)
  self.transformer.transform(code)
end