Comments (12)
I think renameDefaults: true
makes a lot of sense. I don't think anybody wants to have something called default
and moreover risk overwriting reflections when merging modules. I think I can add this option sometime next week.
from typedoc-plugin-merge-modules.
New option mergeModulesRenameDefaults
added in version 2.0.0. 🎉
from typedoc-plugin-merge-modules.
If you want, you can try with my repository:
https://github.com/felipecrs/megatar/tree/upgrade-typedoc/website
https://gitpod.io/#https://github.com/felipecrs/megatar/tree/upgrade-typedoc/website
from typedoc-plugin-merge-modules.
PS: this makes the API not browsable, as only one "default" link works.
from typedoc-plugin-merge-modules.
Hi Felipe. I'm glad the plugin is useful for somebody.
If you look at the code you will see that the plugin does nothing fancy. It only moves all reflections from the modules into the project.
So the answer to your question is: No, it should not rename any exports at the moment. Naming collisions are not handled. I can have a look at that though.
What would be your expected output?
from typedoc-plugin-merge-modules.
No, it should not rename any exports at the moment. Naming collisions are not handled.
I thought more about it, and I agree, you're right. Especially because users may want to do the "renaming" without using your plugin together, so it would be better to be a standalone plugin.
What would be your expected output?
With TypeDoc 0.19 and --mode files
, this is what I had:
Now, with TypeDoc 0.20 and your plugin:
Without your plugin:
(despite the bad naming, they at least don't overlap)
PS: I'm using docusaurus, but I already tested and this behavior remains in vanilla TypeDoc html generator.
from typedoc-plugin-merge-modules.
That would mean that moving the reflections to the project somehow destroys their "path". I'll take a look when I find the time. This should by fairly easy to reproduce with a simple example.
from typedoc-plugin-merge-modules.
@krisztianb fyi https://github.com/felipecrs/typedoc-plugin-rename-defaults
from typedoc-plugin-merge-modules.
Interesting. Thanks for the heads up. I was thinking about adding an option (something like renameDefaults: true|false
) to this plugin so that you don't need to create a separate one, since when merging modules this can be a common problem.
from typedoc-plugin-merge-modules.
The main motivation for having a separate plugin is to be able to use it without your plugin.
from typedoc-plugin-merge-modules.
I mean, for those who would still like to have their defaults renamed but they don't want to merge the modules. But the code itself is quite easy, as proposed by Gerrit0 at TypeStrong/typedoc#1521 (comment).
from typedoc-plugin-merge-modules.
I thought in these options:
- As you said, add the code and an option (and think about leaving the renameDefaults: true it by default, as it would cause the docs to overlap otherwise)
- Add typedoc-plugin-rename-defaults as dependency of yours, but I don't really know if that would work
- Simply document in the README, so who find this issue know what to do (install the typedoc-plugin-rename-defaults plugin)
from typedoc-plugin-merge-modules.
Related Issues (11)
- Namespaces and Interfaces are not merged. HOT 6
- merge those module has the same name but in different categories HOT 5
- merge things into the same file HOT 5
- Usage with monorepo doesn't seem to work HOT 16
- When the plugin is turned off it still renames default exports HOT 1
- Error when running typedoc HOT 2
- Interface and Properties names are not replacing 'default' HOT 3
- Plugin fails to load with typedoc 0.22.3 HOT 2
- Difficulty using options HOT 6
- @packageDocumentation not behaving correctly HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typedoc-plugin-merge-modules.