-
-
Notifications
You must be signed in to change notification settings - Fork 142
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 standalone docs apps #409
Conversation
This makes it possible to separate your docs application from your addon's dummy app. Fixes ember-learn#383. The way it works is: - you're still required to keep both the addon and the docs app in the same repo (so we don't need to worry about separately versioning each) - but they can be peers or subdirectories of each other - in your docs application you add ember-cli-addon-docs - in your docs application you must set the `documentingAddonAt` option to point at the path of the actual addon. As a side-effect of refactoring the way "Edit this page" links work, I think I also fixed them for API-docs pages in all addon docs sites (not just ones using this new architecture).
@@ -1,5 +1,5 @@ | |||
import DS from 'ember-data'; | |||
import config from 'dummy/config/environment'; | |||
import config from 'ember-get-config'; |
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 and the many other edits like it are because we don't want to hard-code the name "dummy" as our app's modulePrefix.
let rootEditUrl = `${projectHref}/edit/${primaryBranch}${projectPath}`; | ||
let match = this._locateFile(path); | ||
if (match) { | ||
let { projectHref, addonPathInRepo, docsAppPathInRepo, primaryBranch } = config['ember-cli-addon-docs']; |
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.
Now instead of a single projectPathInRepo
, we have separate addonPathInRepo
and docsAppPathInRepo
.
As of ember-animation/ember-animated#171 ember-animated is using this fork, so you can see how it works. It's deployed as https://ember-animation.github.io/ember-animated/versions/master/ |
Amazing amount of effort + work. Thanks for donating so much to this community project! Could you give us a tl;dr of the steps an Addon should/would take to move from the dummy app to a standalone |
General steps to convert an existing dummy app to a separate app:
|
@ef4 any idea if Dependabot will work with both the root addon and the app in a subdirectory? |
I think dependabot lets you configure individual directories in a repo, but somebody should try it. |
@samselikoff are we good to merge this? |
I think it would be fine to merge but also would be good to get one other app testing it? Ideally even a test-project within this repo but if that's too much work just convert some other Addon to use a separate project. |
I started working on a new set of addons and created an app for the docs. I tested this branch with my setup and it is working as expected. It would be awesome to get this merged into master and released. My setup is here: https://github.com/josemarluedke/frontile/tree/docs-app |
@samselikoff is that good enough to merge? |
Seems good! Will try to do this on one of my addons soon. |
This makes it possible to separate your docs application from your addon's dummy app. Fixes #383.
The way it works is:
documentingAddonAt
option to point at the path of the actual addon. This option is what opts you into the new behavior, otherwise nothing should be changed.As a side-effect of refactoring the way "Edit this page" links work, I think I also fixed them for API-docs pages in all addon docs sites (not just ones using this new architecture).