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

entryPoints custom names #2525

Closed
reyafyi opened this issue Mar 15, 2024 · 1 comment
Closed

entryPoints custom names #2525

reyafyi opened this issue Mar 15, 2024 · 1 comment
Labels
enhancement Improved functionality wontfix Declining to implement

Comments

@reyafyi
Copy link

reyafyi commented Mar 15, 2024

Search Terms

custom names for entry points, exports map

Problem

the problem is basically #1937 - the ability to outline the consumer apis in the docs, and not the internal library structure.

but since that issue seems dormant for some time already, i'd like to propose a (likely) much easier to implement solution

Suggested Solution

instead of parsing exports map, entryPoints in config could accept an object instead, where the keys are the names of the resulting branches in the tree, and values are the typescript entrypoints they correspond to.

so assuming i have an exports map like this:

"exports": {
  ".": "./index.ts",
  "./foo": "./__internal__/foo.ts
},

i'd write this in my typedoc.cjs:

entryPoints: {
  index: './index.ts',
  foo: './__internal__/foo.ts'
}

now this obviously wouldn't work for mixed export maps (where there are both wildcard exports and normal ones), since that would require having different entry point strategies for different entry points (is there a tracking issue for this to link?), but should still cover many cases

@reyafyi reyafyi added the enhancement Improved functionality label Mar 15, 2024
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Mar 16, 2024

You can already do this with the @module tag, __internal__/foo.ts would look like this:

/**
 * @module foo
 */
... code for module

@Gerrit0 Gerrit0 added the wontfix Declining to implement label Mar 16, 2024
@Gerrit0 Gerrit0 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improved functionality wontfix Declining to implement
Projects
None yet
Development

No branches or pull requests

2 participants