jmurphyau / ember-truth-helpers

Ember HTMLBars Helpers for {{if}} & {{unless}}: not, and, or, eq & is-array
MIT License
706 stars 95 forks source link

Glint Support #176

Closed gossi closed 1 year ago

gossi commented 1 year ago

I was tired of writing this in my new glint projects with SFC support:

import eq from 'ember-truth-helpers/helpers/equal';
import not from 'ember-truth-helpers/helpers/not';
...

I wanted to write this instead:

import { eq, not } from 'ember-truth-helpers';

while at the same time, using truth helpers in classic hbs files (that are now powered by glint).

In order to do so. I did this:

There we are. Truth helpers with glint support. I tried to keep the PR reviewable on a commit-by-commit basis.

SergeAstapov commented 1 year ago

This looks fantastic! Thank you @gossi!

Note: CI is unhappy here, I'll work on it separately