mirror of
https://github.com/danog/liquid.git
synced 2024-11-30 04:09:00 +01:00
CLI script to run shopify liquid for cf.
This commit is contained in:
parent
f1412b603c
commit
534c0e3e50
12
scripts/shopify-liquid
Executable file
12
scripts/shopify-liquid
Executable file
@ -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)
|
Loading…
Reference in New Issue
Block a user