Module: Brandish::Processors::HTML::Script::Babel
- Included in:
- Brandish::Processors::HTML::Script
- Defined in:
- lib/brandish/processors/html/script/babel.rb
Overview
Note:
The libraries that these engines depend on are not required in
by default; if any of these engines are used, the requisite
libraries would have to be required by the brandish.config.rb
file.
A set of scripting engines that use the Babel transpiler.
Engines:
"babel"
,"babel-file"
- A command. This takes the contents of the resolved file, transpiles it, and outputs it into the output path, given by#load_file_paths
."babel-inline"
- A block. Similar to"babel"
; however, it takes the block, uses Brandish::Parser::Node::Root#flatten on it, transpiles the result, and adds that as an inline script.