lib/processing.rb in runeblog-0.2.88 vs lib/processing.rb in runeblog-0.2.89
- old
+ new
@@ -20,11 +20,12 @@
return false
end
def preprocess(cwd: Dir.pwd, src:,
dst: (strip = true; File.basename(src).sub(/.lt3$/,"")),
- deps: [], copy: nil, debug: false, force: false, vars: nil)
+ deps: [], copy: nil, debug: false, force: false,
+ mix: [], call: [], vars: {})
src += LEXT unless src.end_with?(LEXT)
dst += ".html" unless (dst.end_with?(".html") || strip)
sp = " "*12
Dir.chdir(cwd) do
if debug
@@ -35,11 +36,11 @@
STDERR.puts "#{sp} from: #{caller[0]}"
STDERR.puts "#{sp} copy: #{copy}" if copy
end
stale = stale?(src, dst, deps, force)
if stale
- live = Livetext.new
- out = live.xform_file(src, vars: vars)
+ live = Livetext.customize(mix: "liveblog", call: call, vars: vars)
+ out = live.xform_file(src)
File.write(dst, out)
system!("cp #{dst} #{copy}") if copy
end
puts "#{sp} -- ^ Already up to date!" if debug && ! stale
end