typed-ember / glint

TypeScript powered tooling for Glimmer templates
https://typed-ember.gitbook.io/glint
MIT License
110 stars 51 forks source link

allow customizing template processing in custom environments for hbs files #585

Closed patricklx closed 1 year ago

patricklx commented 1 year ago

i'm trying to create a custom env for ember-hbs-imports which was working in a hacky way until 0.9.7. see https://github.com/patricklx/ember-hbs-imports/blob/main/glint/glint-hbs-imports-env.js I just need to be able to preprocess the template contents, or even better, transform the ast. afterwards I can probably add a transform for the ts source part to add setEmitMetadata and I would need to be able to pass globals...

not sure if there is a better way?

chriskrycho commented 1 year ago

Glint does not have the maintainer time commitment to support multiple syntaxes. Given Ember RFC 779, we are committed to supporting loose mode templates for .hbs and strict mode templates in .gjs/.gts with <template>, and we will absolutely not support any other modes. I understand that might be disappointing, but anything else would be dishonest about what we can or cannot support!

Additionally, given Ember’s own direction, I would strongly recommend that you deprecate ember-hbs-imports and move to the form the community will be standardizing on.