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

Support v2 addon format #1164

Merged
merged 1 commit into from
Mar 27, 2022
Merged

Support v2 addon format #1164

merged 1 commit into from
Mar 27, 2022

Conversation

SergeAstapov
Copy link
Collaborator

The src folder is a the new convention for the location of the addon source code.

This can be seen in Porting an Addon to V2 guide as well as part of new addon blueprint.

This was tested in ember-animation/ember-animated#397

@RobbieTheWagner
Copy link
Member

@SergeAstapov is this all that is required? Does moving an addon to V2 fix our issues with embroider compatibility or does this just work for ember-animated because it has the docs as a separate app from the tests?

@SergeAstapov
Copy link
Collaborator Author

is this all that is required?

yes, as far as I can see working on ember-animated - this is all what is needed from ember-cli-addon-docs package.

Does moving an addon to V2 fix our issues with embroider compatibility?

unfortunately no. There are some issues in the ember-cli-addon-docs or it's dependencies. still haven't figured out what exactly.

does this just work for ember-animated because it has the docs as a separate app from the tests?

exactly! the docs app in ember-animated is not being tested against embroider

@ef4
Copy link
Contributor

ef4 commented Mar 13, 2022

I will point out that for v2 addons this is only a convention and not a hard requirement. So this PR makes sense as a good default, but it would also be good to let addon authors set this path explicitly.

@RobbieTheWagner
Copy link
Member

@SergeAstapov @ef4 do we want to allow users to tweak the path as part of this PR or should we follow up later? I am fine either way.

@SergeAstapov SergeAstapov marked this pull request as draft March 15, 2022 01:47
@SergeAstapov
Copy link
Collaborator Author

@rwwagner90 I'd like to introduce that ability in this PR. It should be relatively simple and no need to have multiple PRs to introduce such feature.

@ef4 thank you for the idea making this configurable.

Converted PR to draft for now.

@SergeAstapov SergeAstapov marked this pull request as ready for review March 15, 2022 03:51
@SergeAstapov
Copy link
Collaborator Author

@rwwagner90 updated PR: src is now default folder name for the v2 addon source code which could be overridden via addonSrcFolder like so:

let app = new EmberApp(defaults, {
  'ember-cli-addon-docs': {
    documentingAddonAt: '../addon',
    addonSrcFolder: 'source',
  }
});

@RobbieTheWagner RobbieTheWagner merged commit b330f9a into ember-learn:master Mar 27, 2022
@SergeAstapov SergeAstapov deleted the support-v2-addon-format branch March 27, 2022 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants