Module Unification Addon blueprint#7658
Conversation
| modulePrefix: name, | ||
| namespace, | ||
| addonName, | ||
| // addonModulePrefix: addonName, |
There was a problem hiding this comment.
It's not clear to me the difference between addonModulePrefix and addonName and which one should I use.
There was a problem hiding this comment.
I don't see addonModulePrefix used anywhere in these files.
There was a problem hiding this comment.
It is not, I decided to use addon name. But I wanted to understand if there was a good reason for that weird naming
|
Can someone rebuild this? I think it's a random failure. |
7a276ee to
d467039
Compare
e3fb855 to
abb6920
Compare
…on layout. MODULE_UNIFICATION=true ember addon my-addon MODULE_UNIFICATION=true ember addon my-addon --yarn
abb6920 to
e0f4ce5
Compare
| @@ -0,0 +1,9 @@ | |||
| The MIT License (MIT) | |||
|
|
|||
| Copyright (c) 2018 | |||
| "devDependencies": { | ||
| "broccoli-asset-rev": "^2.4.5", | ||
| "ember-ajax": "^3.0.0", | ||
| "ember-cli": "~3.1.0-beta.1", |
There was a problem hiding this comment.
The test is asserting that the same files are being created, not that the contents of those files are the same. Afaik, all other tests are similar.
There was a problem hiding this comment.
oh, right. there is no verification of result files contents
| 'use strict'; | ||
| const addonBlueprint = require('../addon'); | ||
|
|
||
| module.exports = Object.assign({}, addonBlueprint, { |
There was a problem hiding this comment.
This is where it all happens. The only difference with the generate of standard addons is the description and the files. I couldn't find a better way of "inheriting" from an existing blueprint.
| @@ -0,0 +1,47 @@ | |||
| --- | |||
There was a problem hiding this comment.
Seems weird to have both .travis.yml and travis.yml in the diff here
There was a problem hiding this comment.
seems like all of the .foo files have this issue?
mixonic
left a comment
There was a problem hiding this comment.
I take it all back.
After discussion in chat, please try to have the dummy app be a module unification app (use tests/dummy/src/).
We will have a future hurdle after landing this PR: Addon authors may want to run their acceptance tests with both a MU src/ app and with a classic app/ app. This allows them to test the modern namespaced interface as well as the classic re-exported interface.
rwjblue
left a comment
There was a problem hiding this comment.
DOH! The duplicates I thought I saw were actually test fixtures, sorry about that!
|
Chatted with @mixonic in slack, we agree that this can land and changing the default dummy app setup to be module unification should happen in a follow up PR. |
This adds the ability of generating addons using the module unification layout.
MODULE_UNIFICATION=true ember addon my-addon
MODULE_UNIFICATION=true ember addon my-addon --yarn
@GavinJoyce @mixonic