Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document and provide imports for Ember.HTMLBars.* #16321

Closed
Gaurav0 opened this issue Mar 5, 2018 · 8 comments
Closed

Document and provide imports for Ember.HTMLBars.* #16321

Gaurav0 opened this issue Mar 5, 2018 · 8 comments

Comments

@Gaurav0
Copy link
Contributor

Gaurav0 commented Mar 5, 2018

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 by ember-cli and by ember-cli-htmlbars-inline-precompile to precompile templates to wire format. It is also required by addons that render server side such as ember-fastboot.

compile is required by applications such as Ember-Twiddle that need to compile templates client side.

@rwjblue
Copy link
Member

rwjblue commented Apr 21, 2018

Reviewed this with @tomdale the other day (while triaging the list in ember-cli/ember-rfc176-data#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';

@rwjblue
Copy link
Member

rwjblue commented Apr 22, 2018

ember-cli/ember-rfc176-data#48 adds the implementation needed, now we need to update docs to reflect the new paths.

@locks
Copy link
Contributor

locks commented Apr 22, 2018

cc @emberjs/learning-team-managers

@krisselden
Copy link
Contributor

@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

@rwjblue
Copy link
Member

rwjblue commented Apr 24, 2018

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).

@krisselden
Copy link
Contributor

krisselden commented Apr 24, 2018

Ember.HTMLBars.template -> import template from '@ember/template'

@yininge
Copy link

yininge commented Sep 21, 2018

I think we can close this one. It looks like the documentation is added to https://github.com/ember-cli/ember-rfc176-data

@pixelhandler
Copy link
Contributor

screen shot 2018-09-21 at 2 38 17 pm

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants