You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @redmunds I've pushed a fix for this and a new version to npm registry. Can you verify this is fixed for you?
Additionally, I'm seeing that after a run, the output folder gets locked and I cannot overwrite it in subsequent runs. Since I'm running on a VM, could you confirm if this happens to you as well?
@jbalsas No, it's still not fixed. I left this out of the original recipe, but the first thing I do in index.htmis click on "brackets" module
This is the link I see in Dependencies section for "Menus": <a href="..\..\../modules/command/Menus.html">Menus</a>
Interesting that the "Menus" link in the left sidebar does work (although it still has backslashes that will only work on Windows): <a href="..\..\../modules/brackets/src/command/Menus.html">Menus</a>
output folder gets locked
No, I'm not seeing that. I added a dependency to Menus.js, shutdown Brackets, and re-ran the apify command. I did not see any errors in terminal and the dependency was added when I looked at the api docs. Let me know if that's not a good test.
Hey @redmunds, I fixed the left backslashes and I think I finally figured out what's going on. Please, correct me if I'm mistaken.
My guess is that you're running the apify command with the --source parameter pointing to the whole Brackets folder instead of just src. Do you think this should be possible? As I see, we'll be documenting way more than just the sources with this (tests and other libraries, for example).
When processing a module, we only know about its dependencies by analyzing the require() calls. Chek for example brackets.js:
Since those are relative to the src folder, the urls will break if the root folder we're using does not match.
Afaict, there's no easy way to guess the baseUrl for the require calls. If we'd want this in a generic way, we'd need to pass something resembling the require.js configuration paths, and probably create as well some kind of sandboxes in case you have more than one source folder (like src and tests).
With all these in mind, I'm not sure if it's really worth it, considering everything should be fine if you apify just your sources ;)
I was only trying to generate docs for src folder. As taken from one of your examples I was using --source src/. But that was causing output folder to be inside brackets folder (which makes all the files show up in git), so I went up a folder and started using --source brackets/src/.
I think we can then just normalize all the file paths to be relative to the --source parameter. In that way, both the file paths on the left file list and the ones in the dependencies list should be fine.
Yep, did that part, and was working on a normalizePath method as well to make paths relative to the --source parameter, but didn't have time to finish yet
Activity
jbalsas commentedon Apr 26, 2014
Hey @redmunds I've pushed a fix for this and a new version to npm registry. Can you verify this is fixed for you?
Additionally, I'm seeing that after a run, the output folder gets locked and I cannot overwrite it in subsequent runs. Since I'm running on a VM, could you confirm if this happens to you as well?
Thanks!
redmunds commentedon Apr 26, 2014
@jbalsas No, it's still not fixed. I left this out of the original recipe, but the first thing I do in
index.htmis click on "brackets" moduleThis is the link I see in Dependencies section for "Menus":
<a href="..\..\../modules/command/Menus.html">Menus</a>Interesting that the "Menus" link in the left sidebar does work (although it still has backslashes that will only work on Windows):
<a href="..\..\../modules/brackets/src/command/Menus.html">Menus</a>No, I'm not seeing that. I added a dependency to
Menus.js, shutdown Brackets, and re-ran theapifycommand. I did not see any errors in terminal and the dependency was added when I looked at the api docs. Let me know if that's not a good test.Normalize more file paths (#3)
Concatenate docPath for module dependencies urls (#3)
jbalsas commentedon Apr 28, 2014
Hey @redmunds, I fixed the left backslashes and I think I finally figured out what's going on. Please, correct me if I'm mistaken.
My guess is that you're running the
apifycommand with the--sourceparameter pointing to the whole Brackets folder instead of justsrc. Do you think this should be possible? As I see, we'll be documenting way more than just the sources with this (tests and other libraries, for example).When processing a module, we only know about its dependencies by analyzing the
require()calls. Chek for examplebrackets.js:Since those are relative to the
srcfolder, the urls will break if the root folder we're using does not match.Afaict, there's no easy way to guess the
baseUrlfor the require calls. If we'd want this in a generic way, we'd need to pass something resembling therequire.jsconfiguration paths, and probably create as well some kind of sandboxes in case you have more than one source folder (likesrcandtests).With all these in mind, I'm not sure if it's really worth it, considering everything should be fine if you apify just your sources ;)
What do you think?
redmunds commentedon Apr 28, 2014
I was only trying to generate docs for src folder. As taken from one of your examples I was using
--source src/. But that was causing output folder to be inside brackets folder (which makes all the files show up in git), so I went up a folder and started using--source brackets/src/.jbalsas commentedon Apr 28, 2014
Oh, I see... that makes sense.
I think we can then just normalize all the file paths to be relative to the
--sourceparameter. In that way, both the file paths on the left file list and the ones in the dependencies list should be fine.I'll work on that tomorrow and let you know.
Thanks!
redmunds commentedon May 26, 2014
A reasonable solution would be just to blindly replace\with/in file/url paths on Windows.UPDATE: I got the latest version and see this is already done.
jbalsas commentedon May 27, 2014
Yep, did that part, and was working on a
normalizePathmethod as well to make paths relative to the--sourceparameter, but didn't have time to finish yet[-]Windows: Incorrect paths are generated[/-][+]Shorter paths could be generated[/+]redmunds commentedon May 28, 2014
Updated subject. Removed Windows label since this applies to all platforms.UPDATE: I'm still seeing broken links on Dependencies, so I changed Subject back to original.
[-]Shorter paths could be generated[/-][+]Windows: Incorrect paths are generated[/+]