emberjs / babel-plugin-ember-template-compilation

Babel implementation of Ember's low-level template-compilation API
9 stars 11 forks source link

Source to source mode #9

Closed ef4 closed 2 years ago

ef4 commented 2 years ago

This adds support for running AST transforms without doing the full compilation, in the same way that Embroider does in stage1.

This would replace the need for that, and by unifying the implementations means that we'll get consistent handling of features like lexical scope even as we introduce ast transforms that can manipulate JS scope.

This also makes the AST transforms a first-class option. Classically, implementations have always wrapped ember's precompile function in a closure that provides the transform plugins, but there's no need to do that.

This is a breaking change because I changed the options format, because instead of only needing the ember template compiler's precompile function we now use the whole ember template compiler module.

ef4 commented 2 years ago

Tagged and published v2.0.0-alpha.0 off this branch.

ef4 commented 2 years ago

I'm going to merge this and the other pending work so that we can better coordinate what will be babel-plugin-ember-template-compilation 2.0.0-beta series.