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

Ability to sort entry points #2393

Closed
frank-weindel opened this issue Sep 11, 2023 · 5 comments
Closed

Ability to sort entry points #2393

frank-weindel opened this issue Sep 11, 2023 · 5 comments
Labels
enhancement Improved functionality

Comments

@frank-weindel
Copy link

frank-weindel commented Sep 11, 2023

Search Terms

entry point, sort, sorting

Problem

I'm supplying a list of separate entry points (which map to different NPM package exports), and I'd like to make sure they appear in the generated docs in a certain order. One of the exports is the main export of the package, and I want that one at the top to emphasize that fact. The others are used in special circumstances only.

Currently the generated docs sort them in alphabetical order.

Suggested Solution

Perhaps the order that you supply entry points in the entryPoints array should dictate the order they appear in the generated docs.

@frank-weindel frank-weindel added the enhancement Improved functionality label Sep 11, 2023
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Sep 13, 2023

Hmm... how does this play with people who specify wildcards as entry points? Glob expansion order isn't generally specified & depends on your OS. Currently, everything is sorted with the --sort option.

@frank-weindel
Copy link
Author

frank-weindel commented Sep 15, 2023

Just some way to mandate/hardcode a certain order at any level of the nav would be great. If I come up with a good idea I'll post it here. Perhaps some kind of array of item names that are ordered with top priority before the other sorting rules.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Sep 16, 2023

I suppose a --sortEntryPoints false option meets the initial requirement. "at any level of the nav" is more complicated

@frank-weindel
Copy link
Author

That would work!

@Gerrit0 Gerrit0 closed this as completed in 6cb49b2 Oct 8, 2023
@frank-weindel
Copy link
Author

Thanks @Gerrit0!

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

No branches or pull requests

2 participants