%w[json erb] .each { require _1 } def fputs(f, c) puts "fputs #{f}" File.write f, c end def erb(tmpl, ctx={}) = ERB.new(File.read(tmpl), trim_mode: "-") .result_with_hash(ctx) module Component def Component.parse(str) script = []; style = []; html = [] cur = html str.lines.each do |line| line = line.chomp if line == "