From ca51ae66c40c0f040b81a5ed7b39602eb30c4ad2 Mon Sep 17 00:00:00 2001 From: Simon Parri Date: Sun, 16 Feb 2025 23:29:02 -0600 Subject: Add version 0.1 --- Rakefile | 130 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 Rakefile (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..38adb95 --- /dev/null +++ b/Rakefile @@ -0,0 +1,130 @@ +%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 == "