Handlebars pretty printer
This is an attempt to make a pretty printer for handlebars, powered by the glimmer-vm.
{{ mustache param firstHash =hash hash =hash hash =hash hash =hash hash =hash hash =hash hash =hash hash =hash }}
{{ mustache param firstHash =hash
hash =hash
hash =hash
hash =hash
hash =hash
hash =hash
hash =hash
hash =hash
}}
{{ #large-block-component hashKey =hashKey foobar =foobar hashValue =hashValue hashKey = (not (and subExpressionParam subExpressionParam param param param )) hashKey = (action " stringLiteral" )
}}
{{ #large-block-component
hashKey =hashKey
foobar =foobar
hashValue =hashValue
hashKey =
(not
(and subExpressionParam subExpressionParam param param param )
)
hashKey = (action " stringLiteral" )
}}
{{ foobar-sub-component/foobar-foo
hook =" stringLiteral"
foo = (t (concat " stringLiteral" (get blockParam " stringLiteral" ) hash =hash hash =hash )
foo = (simple-helper (hash hashKey =blockParam.foo assignParam =blockParam.bar )))}}
{{ foobar-sub-component/foobar-foo
hook =" stringLiteral"
foo =
(t
(concat
" stringLiteral"
(get blockParam " stringLiteral" )
hash =hash
hash =hash
)
foo =
(simple-helper (hash hashKey =blockParam.foo assignParam =blockParam.bar ))
)
}}
<input type =" stringLiteral" class =" stringLiteral" name =" stringLiteral" onChange ={{ action " stringLiteral" null }} checked ={{ is-empty fooBarParam }} >
<input type =" stringLiteral"
class =" stringLiteral"
name =" stringLiteral"
onChange ={{ action " stringLiteral" null }}
checked ={{ is-empty fooBarParam }} >
{{ #with (long-name-helper (map-by " stringLiteral" foobar.keyOfParam )) as |block assign |}} {{ /with }}
{{ #with
(long-name-helper (map-by " stringLiteral" foobar.keyOfParam ))
as |block assign |}}
{{ /with }}
Accept file/directory as input/output
Find more test cases that may fail and fix them.
Make the print function more modular
Add proper travis ci integration
Write contribution.md
Make a website where one can interactively test the pretty printer.
npm run test:watch