-
Notifications
You must be signed in to change notification settings - Fork 0
Fix canjs/can-define#176. Related to #204 #232
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
Conversation
| if (!current.src) { | ||
| return false; | ||
| } | ||
| var name = packageObject.name, |
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.
@leoj3n do you know what packageObject.name is? Is it intended to be the parent package name? So in this case canjs. Or is it meant to be the name of the current package being processed?
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.
It looks like it's the docObject or docMap in it's entirety.
https://github.com/bit-docs/bit-docs-tag-package/blob/master/package.js
https://github.com/canjs/bit-docs-html-canjs/blob/master/templates/title.mustache#L32
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.
Oh, I thought you were asking what is packageObject. For packageObject.name, that should simply be the name property, taken straight from package.json. So, for CanJS, it should be just "can".
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.
afaik packageObject.name is actually the name given in the @page tag on the closest parent documentation page with a @package tag
chasenlehara
left a comment
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 seems to be already working here: https://canjs.com/doc/can-define.html Am I missing something? |
| var name = packageObject.name, | ||
| version = 'v' + packageObject.package.version, | ||
| srcPath = current.src.path.replace('node_modules/' + name + '/', ''), | ||
| srcPath = current.src.path.replace(SRC_PREFIX_REGEX, ''), |
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.
Can you describe why this change was necessary? What did current.src.path look like?
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.
The string looks like node_modules/[module_name]/*. The problem is packageObject.name is always canjs.
|
@justinbmeyer try this one for a live example of a 404 |
|
Closing in favor of #257 |
Fix bug breaking some
Edit on Githublinks.fixes canjs/can-define#176
fixes #204