Conversation
3b029cd to
1aac85f
Compare
0bdf691 to
50e835e
Compare
Also ensure delayed transpilation works properly with addon's having /src.
lib/models/addon.js
Outdated
| @return {Tree} App file tree | ||
| */ | ||
| treeForApp(tree) { | ||
| if (!experiments.MODULE_UNIFICATION || this.project.isModuleUnification()) { |
There was a problem hiding this comment.
pretty sure this should be || !this.project.isModuleUnification()) with a not (!)
There was a problem hiding this comment.
discussed in slack, I think we actually need the following guard:
if (!experiments.MODULE_UNIFICATION) {
return tree;
} else if (project.isModuleUnification() && this.isModuleUnification()) {
return null;
}And add a new isModuleUnification method to the addon base class...
- required so that a module-unification app can handle a mix of addons which are module-unification (in which case they have a src folder but no app folder), or classic (in which case they have an app folder).
improve logic for if addon is module-unification
| @@ -0,0 +1,9 @@ | |||
| module.exports = { | |||
| name: 'basic-thing', | |||
There was a problem hiding this comment.
@mixonic I wonder if these tests are failing because the name doesn't match the folder name. In the other examples they do.
PS how do I run just these tests locally, and even better is it possible to run them in the browser?
| @@ -0,0 +1 @@ | |||
| /* addon/styles/app.css is present */ | |||
There was a problem hiding this comment.
This is not the correct location for styles in MU
|
@rwjblue is this PR supposed to let addon authors write addons with the MU project structure ? |
|
@bartocc - Yes, it is the first baby step towards that goal. |
Todo:
Missing template processorwhen missing ember-cli-htmlbars in dependecies i.e. it exists in dev-dependenciesthrow an error (or do something) when an addon can't decide if it's mu or classic (i.e. has src/ and addon/ or app/ folders)@rwjblue and @mixonic think having all three dirs is a valid case. We're going to leave the current ambiguous behavior.srcprocessing is lazy (per add delayed transpilation #7501)Tests:
Future TODOS: