dedent version of `hbs`?
Is there appetite for a version of hbs that dedents the template string?
I find myself often doing things like
layout: hbs(dedent`
greeting: <span>{{greeting}}</span>
`)
with an npm package, but it always feels like extra work & is most of the time (always?) what I want.
You can see in Ember Animated's codebase Ed's forced to manually dedent the strings because he never got around to installing dedent, which kinda sucks.
Wondering if we could export an hbsd or hbsDedent tag that does this automatically.
layout: hbsDedent`
greeting: <span>{{greeting}}</span>
`)
Watcha think?
Unsure. I don't really like the idea that we'd have to provide a bunch of different hbsFoo style exports, but I am sensitive to the specific issue.
Specifically,dedent isn't really "good enough" here (also I much prefer stripIndent which I commonly use from common-tags npm package over dedent) since sometimes you want to effectively trim each line (leading and trailing spaces).
I wish there was a way to customize tag functions. Not sure what it would look like.
Or maybe hbs could have some different properties that are different tags
hbs.stripIndent(`
<p>Hello, foo</p>
`
Ya, hbs.stripIndent "feels" vaguely better to me.