This repository was archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix(docs): retrieve source descriptor dynamically. #7319
Closed
devversion
wants to merge
1
commit into
angular:master
from
devversion:fix/component-data-descriptor
Closed
fix(docs): retrieve source descriptor dynamically. #7319
devversion
wants to merge
1
commit into
angular:master
from
devversion:fix/component-data-descriptor
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
At the moment the doc descriptor is retrieved through hard-coding. This causes problems when a component is not located in the hard-coded folder `src/components` After this fix, the doc descriptor will be dynamically parsed (using the last possible descriptor criteria), so this allows components to be located everywhere in the project. This fixes the wrong GitHub links for the ripple service / component. Fixes angular#7131
@EladBezalel - can you review ? |
LGTM |
// For example it retrieves from `/opt/material/src/core/services/ripple/ripple.js` the following | ||
// source descriptor: `src/core/`. | ||
// This is needed because components are not only located in `src/components`. | ||
var descriptor = doc.fileInfo.filePath.toString().match(/src\/.*?\//g).pop(); |
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.
I feel like the node fs
api might be able to do this more easily, but I'm not that familiar with it.
@robertmesserle ?
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.
Nothing comes to mind, but I'm not sure I fully understand the context.
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.
I don't think the fs
/ path
api has anything for that, it's a really unspecific case.
LGTM |
ThomasBurleson
pushed a commit
that referenced
this pull request
Apr 1, 2016
At the moment the doc descriptor is retrieved through hard-coding. This causes problems when a component is not located in the hard-coded folder `src/components` After this fix, the doc descriptor will be dynamically parsed (using the last possible descriptor criteria), so this allows components to be located everywhere in the project. This fixes the wrong GitHub links for the ripple service / component. Fixes #7131. Closes #7319
ThomasBurleson
pushed a commit
that referenced
this pull request
Apr 1, 2016
At the moment the doc descriptor is retrieved through hard-coding. This causes problems when a component is not located in the hard-coded folder `src/components` After this fix, the doc descriptor will be dynamically parsed (using the last possible descriptor criteria), so this allows components to be located everywhere in the project. This fixes the wrong GitHub links for the ripple service / component. Fixes #7131. Closes #7319
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
At the moment the doc descriptor is retrieved through hard-coding.
This causes problems when a component is not located in the hard-coded folder
src/components
After this fix, the doc descriptor will be dynamically parsed (using the last possible descriptor criteria), so this allows components to be located everywhere in the project.
This fixes the wrong GitHub links for the ripple service / component.
Fixes #7131