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

Allow modules to be split across files #515

Open
hegemonic opened this issue Nov 5, 2013 · 6 comments
Open

Allow modules to be split across files #515

hegemonic opened this issue Nov 5, 2013 · 6 comments
Labels
Milestone

Comments

@hegemonic
Copy link
Contributor

Right now it's not possible to split a module definition across multiple JS files. It would be useful if that were possible.

We should think about how to implement this in a way that also helps with #272.

Originally reported by @nenaraab as jsdoc/jsdoc.github.io#44:

we have a module which loads another file. In both files we have objects we want to document. It should be documented as one module. So we set @module mymodule in both files. The generated documentation looks fine in general but is displays the twice at one page. They only differ in the module source.

@nenaraab
Copy link

nenaraab commented Nov 5, 2013

Thanks a lot for the quick reply!
Yes, the issue sounds quite similar to "allowing the same namespace to be documented in multiple places without generating duplicate documentation".
Nena & Christoph

@sempasha
Copy link

sempasha commented Jul 4, 2014

allowing the same namespace to be documented in multiple places without generating duplicate documentation

Wow! Exactly what I'm looking for to do more simple module members definition.

@hegemonic hegemonic modified the milestones: Future, 3.4.0 Oct 22, 2015
@kgryte
Copy link

kgryte commented Apr 13, 2016

@hegemonic Has there been any progress on this? We use JSDoc-style comments extensively in our codebase, but often a module is comprised of several files. Being able to prevent duplication of comments (i.e., not having to create virtual comments in the main export), would be highly beneficial.

@cwingrav
Copy link

I too would like to see some action on this. It generates several entries for namespaces, each duplicating the namespace generated code. Seems more of a bug, than a feature at this point?

@harish2704
Copy link

+1

@harish2704
Copy link

I found this solution works #1002 (comment)

jimbob3806 added a commit to blameitonyourisp/submodule that referenced this issue Jun 28, 2023
Update leafmodule tag to prevent current behaviour of module
duplication due to creating multiple module tage with the same
name.

Update leafmodule tag to instead add memberof tags to all relevant
jsdoc comments in a given file, thus adding all documented symbols
to the desired module without duplication.

Resolves following issues discussed in jsdoc:
    - jsdoc/jsdoc#515
    - jsdoc/jsdoc#1002
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants