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

Support multiple files with the same name. #236

Closed
wants to merge 1 commit into from

Conversation

karlspalding
Copy link

Fixes #223.

Previously, if two or more files had the same base filename
only one would be documented. The others would be overwritten.

This patch replicates the structure of the source tree in the
document output tree to allow source files with the same
name but different paths.

Previously, if two or more files had the same base filename
only one would be documented. The others would be overwritten.

This patch replicates the structure of the source tree in the
document output tree to allow source files with the same
name but different paths.
@keithamus
Copy link
Collaborator

This should be behind a command line switch, because some people desire having a flat doc tree, and this would be a breaking change for those people.

@jashkenas
Copy link
Owner

This should be behind a command line switch

That doesn't sound very quick-and-dirty now, does it?

Instead, it would be nice to leave things flat, but prefix duplicate file names with their relative path as a qualification.

@keithamus
Copy link
Collaborator

Sorry @jashkenas, just concerned about users who currently expect a flat structure

@rudijs
Copy link

rudijs commented Oct 11, 2013

Hi,

I just ran into this problem too.

I'm new to Docco and I found it overwrites files with the same name today.

Example:

% grunt docs|grep articles
docco: app/controllers/articles.js -> docs/docco/articles.html
docco: config/routes/articles.js -> docs/docco/articles.html

Using:

% docco --version
0.6.2

I want to use Docco as other options are all way more complicated than I really need.

I guess moving forward I'll need to re-factor files name in the above example to something like:

app/controllers/articlesController.js
config/routes/articlesRoutes.js

I guess main benefit is all articles docs will group together in the flat structure Docco output folder.

I was assuming they'd not overwrite but that's fine.

Thanks.

@yuku
Copy link

yuku commented Dec 15, 2013

I ran into the same problem.

@keithamus
Copy link
Collaborator

@karlspalding could you please rebase this, then I'll take another look. Thanks 😄

@shadowhand
Copy link
Contributor

+1 I would very much like support for this.

@yanfali
Copy link

yanfali commented May 29, 2014

👍 Is this going to be in the 0.6.4 release?

yanfali added a commit to ceph/calamari-clients that referenced this pull request May 29, 2014
- Work around docco issue #236 - needs support for conflicting file names
  @see jashkenas/docco#236
- simple rename of all the service files so they can co-exist
  in a flat directory.

Signed-off-by: Yan-Fa Li <yanfali@gmail.com>
@senica
Copy link

senica commented Jul 30, 2014

This is much needed. Large project have too many conflicting names to have only names in a flat directory structure.

@joseph-jja
Copy link

I got tired of waiting and created my own fork of grunt-docco, so if you are using grunt

https://www.npmjs.org/package/grunt-docco-dir

@smmoosavi
Copy link

+1

1 similar comment
@voronianski
Copy link

+1

@keithamus
Copy link
Collaborator

Unfortunately we can't merge this until @karlspalding rebases against master. Alternatively, anyone else is welcome to take @karlspalding's implementation and update it in a new PR 😄.

chiefjester added a commit to chiefjester/docco that referenced this pull request Jun 6, 2015
chiefjester added a commit to chiefjester/docco that referenced this pull request Jun 6, 2015
@chiefjester
Copy link
Contributor

@keithamus I took a stab on getting this PR's commit and rebasing it with the current master. Tested in my local and it works #336. Let me know if I need to change the commit attribution, since afterall it was @karlspalding 's original PR.

@joaomilho
Copy link

any update on this one? seems to me very important given all the "index.js" modern front end projects have

@cvega
Copy link

cvega commented Feb 1, 2016

+1

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

Successfully merging this pull request may close these issues.

Files overwritten if same filename