-
Notifications
You must be signed in to change notification settings - Fork 75
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this @pzuraq! Some comments, nothing major though.
One silly question, it it possible to return app instance in |
@lifeart I've been thinking about that a bit, I think it would actually be good to return a public API of sorts. Specifically, I'd like the ability to I think we can do that as a separate PR though, either before v2 is released or sometime after. What use cases were you thinking of that you'd like to support? |
@pzuraq use cases:
https://gist.github.com/lifeart/2c4666844a11b1e8536a32d6c776aacc external access to rendered component instance to support
If we have external data source or business logic, it will be great to have access to root component instance to invoke some methods or set properties to it without hacking. and I was thinking about ability to make first render sync (not promise-based), to support sync web-components api |
@pzuraq looks like the publishing script was removed. Any intention of bringing it back in this PR? |
I believe we can just use lerna publish with this setup, as it builds the packages directly in the same directory rather than a new |
@@ -0,0 +1,10 @@ | |||
<!doctype html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this file here? Shouldn't be in a subdir?
"test:node": "bin/run-node-tests.js", | ||
"test:ember": "yarn workspace @glimmer/component ember try:one", | ||
"test": "yarn lint && testem ci && yarn test:babel-plugins", | ||
"test:babel-plugins": "mocha -r esm --timeout 5000 test/babel-plugins.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should depend on esm
no?
This PR refactors the codebase and public APIs of Glimmer.js significantly in preparation for Glimmer.js v2.0. It includes the following changes:
Removals
@glimmer/app-compiler
@glimmer/application-test-helpers
@glimmer/application
@glimmer/compiler-delegates
@glimmer/test-utils
Additions
New package:
@glimmer/core
:renderComponent
- the new primary public API for starting a Glimmer application. You pass a component definition to it as the first parameter, and an element or options hash as the second, and it renders this component.setComponentTemplate
andcreateTemplate
- New base API for defining a component's template, including imports:A component manager that matches Ember's custom component manager API
A basic modifier manager, which still needs to be updated to match Ember's (in a followup PR)
New package:
@glimmer/modifier
:{{on}}
modifier that matches Ember@action
decorator which matches the binding semantics of Ember's (but not the other behaviors)New package:
@glimmer/helper
:New package:
@glimmer/babel-plugin-glimmer-env
:babel-plugin-debug-macros
to minimize setup cost, and provide debug stripping for@glimmer/env
. This is critical now that glimmer-vm ships with theDEBUG
flag intact.New package:
@glimmer/babel-plugin-strict-template-precompile
createTemplate()
Updates
@glimmer/component
didInsertElement
,bounds
, and other unnecessary APIs from GlimmerComponentGlimmerComponent<T = object>
->GlimmerComponent<Args extends {} = {}>
@glimmer/blueprint
Overall
example-apps
directory, with the future intention being to add more complex examples including the Glimmer playground.Next Steps