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

Multi-directory sites throw error #309

Open
Truffula opened this issue Oct 23, 2014 · 2 comments
Open

Multi-directory sites throw error #309

Truffula opened this issue Oct 23, 2014 · 2 comments

Comments

@Truffula
Copy link

I've just been looking at #303, and noticed that c52298c introduced a breaking change such that multi-directory sites can't generate any more. It probably wasn't picked up earlier because the version number wasn't changed - I suspect I may have previously been running on the npm version which was not in sync with github.

$ docco app/**/*.md
docco: app/adapters/application.coffee.md -> docs/app/adapters/application.coffee.md.html

fs.js:427
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: ENOENT, no such file or directory 'docs/app/adapters/application.coffee.md.html'
    at Object.fs.openSync (fs.js:427:18)
    at Object.fs.writeFileSync (fs.js:966:15)
    at write (/Users/Truffula/Development/Projects/docco/docco.js:154:15)
    at /Users/Truffula/Development/Projects/docco/docco.js:45:11
    at fs.js:266:14
    at Object.oncomplete (fs.js:107:15)

I'm working on a fix which may tie in to #303.

@Truffula
Copy link
Author

Does the project need to switch to semantic versioning so that npm can keep in sync with github (and breaking changes can be implemented or patched with a new version number)? I'm not sure what the usual policy is on when the version number gets bumped.

Truffula added a commit to Truffula/docco that referenced this issue Oct 23, 2014
In the output html files, any directory separators will be replaced
with underscores (rather than replicating the folder structure, which
would create unnecessary headaches with linking). Fixes jashkenas#309, fixes
jashkenas#303. Also includes some previous changes that were in
`docco.litcoffee` but hadn’t found their way into `docco.js`.
Theoretically it would still create a naming conflict in cases where
you had two files, `foo_bar.coffee` and `foo/index.coffee` which could
be precluded with a double-underscore or similar, but I don’t think
there’s a strong likelihood of that occurring.
Truffula added a commit to Truffula/docco that referenced this issue Oct 23, 2014
Applied change from previous commit (re: jashkenas#309 and jashkenas#303) to the classic
and linear templates.

I’m not sure if some people have a preference for just showing the
basename, but that option isn’t really compatible with multi-directory
sites. For single-folder sites (say, if everything is in `app/`, and
you don’t want `app/` at the front of all your links) you can get
around it simply by running docco from within the folder containing the
files (at least with the CLI).
@thomasklein
Copy link

Hi guys! Any news on this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants