-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Initial implementation of co-located templates RFC. #249
Conversation
Still quite WIP, but "basically works" when using ember-cli master which includes ember-cli/ember-cli@84c449a Co-authored-by: Robert Jackson <[email protected]>
1da6bd8
to
fbda2e0
Compare
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.
This breaks this addon https://github.com/sethwebster/ember-cli-new-version/tree/master/addon/components/new-version-notifier with this error
Error: Could not find module ember-cli-new-version/components/new-version-notifier/template
imported from ember-cli-new-version/components/new-version-notifier/component
942c301
to
4c6017b
Compare
537d04b
to
66dff2f
Compare
This is currently breaking with the SyntaxError: /Users/chris/dev/test/new-stuff-yo/new-stuff-yo/components/lame.js: Leading decorators must be attached to a class declaration (6:0)
4 |
5 | @classic
> 6 | const CLASS = class Lame extends Component {
| ^
7 | }
8 |
9 | const setComponentTemplate = Ember._setComponentTemplate; This isn't a problem with the defaults, since the default behavior is to generate a |
We can now rely on Node 8+, so this is "safe".
Running `BROCCOLI_DEBUG=ember-cli-htmlbars:* ember b` will now emit files into `DEBUG/ember-cli-htmlbars/` showing the various stages of compilation (input, after colocation processing, and final output).
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "ember-cli-htmlbars", | |||
"version": "3.1.0", | |||
"version": "3.2.0-alpha.0", |
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.
We'll need to tweak this, as there are breaking changes now on master.
@chriskrycho - Can you share a snippet of what you started with? The error doesn't make it clear... |
Yes, of course! Original input: import Component from '@ember/component';
import classic from 'ember-classic-decorator';
@classic
export default class Lame extends Component {} |
Got an issue popping up over in Seems like a custom transform is not being run against colocated templates. I copied the template in the reproduction app into the |
Mostly fixes prettier
Makes testing easier (at least it makes my mental overhead somewhat less while testing 😀)
This will be done by an AST plugin instead.
No need to require / load build related things when not building...
Refactor implementation of colocation feature.
OK, landed the changes from #280 into here and that should have addressed quite a few of the issues folks have reported:
|
Still quite WIP, but "basically works" when using ember-cli 3.11 and Ember latest canary (including changes from emberjs/ember.js#18158.