Closed Gaurav0 closed 6 years ago
Reviewed this with @tomdale the other day (while triaging the list in https://github.com/ember-cli/ember-rfc176-data/issues/12), we came up with the following:
Ember.HTMLBars.template -> import { wrapTemplate } from '@ember/template-compilation';
Ember.HTMLBars.compile -> import { compileTemplate } from '@ember/template-compilation';
Ember.HTMLBars.precompile -> import { precompileTemplate } from '@ember/template-compilation';
https://github.com/ember-cli/ember-rfc176-data/pull/48 adds the implementation needed, now we need to update docs to reflect the new paths.
cc @emberjs/learning-team-managers
@rwjblue This one is not correct Ember.HTMLBars.template -> import { wrapTemplate } from '@ember/template-compilation';
as this is not used in compilation it is an import that is in the string of the compiled template used at runtime. It does not belong in template-compilation
.
template comes from ember-glimmer
because it is a runtime thing, it is the factory for a template singleton in the DI, and compile and precompile come from the ember-template-compiler
Indeed I am aware of where they come from! 😆
Please feel free to provide a suggestion (without one we will likely just push forward here).
Ember.HTMLBars.template -> import template from '@ember/template'
I think we can close this one. It looks like the documentation is added to https://github.com/ember-cli/ember-rfc176-data
Thanks @yininge I see the imports listed at https://github.com/ember-cli/ember-rfc176-data
@Gaurav0 I'll close this for now, I think the repo above does provide the documentation. cc @emberjs/learning-team-managers
The following apis:
Ember.HTMLBars.precompile Ember.HTMLBars.compile
have not been documented in
ember-api-docs
since they were removed from the ember core build in Ember 1.13 as part of the update to Glimmer 1. AFAIK, they are still public. They also do not have RFC-176 imports.precompile
is used byember-cli
and byember-cli-htmlbars-inline-precompile
to precompile templates to wire format. It is also required by addons that render server side such asember-fastboot
.compile
is required by applications such as Ember-Twiddle that need to compile templates client side.