From 534c0e3e507e3b575fab3902f9a47fd367fc2c51 Mon Sep 17 00:00:00 2001 From: Oliver Steele Date: Sun, 16 Jul 2017 13:42:09 -0400 Subject: [PATCH] CLI script to run shopify liquid for cf. --- scripts/shopify-liquid | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 scripts/shopify-liquid diff --git a/scripts/shopify-liquid b/scripts/shopify-liquid new file mode 100755 index 0000000..e86e472 --- /dev/null +++ b/scripts/shopify-liquid @@ -0,0 +1,12 @@ +#!/usr/bin/env ruby +require 'liquid' + +Liquid::Template.error_mode = :strict + +source = $stdin.read +template = Liquid::Template.parse(source) +out = template.render({}, { strict_filters: true }) +# for e in template.errors do +# # $stderr.puts e +# end +$stdout.write(out)