Comments (9)
Hi. 👋
Currently the plugin supports replacing text in:
- code comments
- included Markdown files
It doesn't support replacing things that are directly taken from the source code.
May I ask what your use case is? Why are you not naming the variable the way to want it to be named in the documentation?
from typedoc-plugin-replace-text.
Hi,
We are using the same file in multiple places in our application, and we have been naming them this way because they are constants. Of course, we can rename them in the application or create some mapping from one name to another, but the easiest and most logical approach would be to only rename them in the documentation.
Kind regards,
from typedoc-plugin-replace-text.
Unfortunately I don't understand what you are doing. 😄 Why do you want the constants to be named differently than their real name? Doesn't that undermine the purpose of the documentation to reflect the code?
from typedoc-plugin-replace-text.
Hello,
I think that our use case is not very common probably.
In the example which @Kartanovicius mentioned, we have defined a constant with a value. The value is a name of function which can be used in code snippet. Usually something like:
export const crmAccountContextSet = async ({ payload, api: { notify }}) => {
await notify.success('Triggered crmAccountContextSet');
// another code
}
These snippets are written by other developers and they are not a part of our codebase. They use a documentation which is generated from our code, but for them is more relevant the value of the constant then the name.
For us is more relevant the name of the constant, but the generated documentation itself not.
So there are two groups of people with different needs, that is the reason why we are looking for something which will modify the generated documentation.
I hope that the use case makes more sense now :-)
from typedoc-plugin-replace-text.
That makes it clearer somewhat but I still don't see why this makes sense. In the documentation you have both the name of the constant and its value. If you rename the constant than all references to it must be renamed also or not? Then the documentation doesn't reflect the code which kind of goes against the point of having a documentation.
from typedoc-plugin-replace-text.
This documentation is not intended for developers but for those who need to configure our product using JavaScript code. For them we have changed constant name to function like to avoid confusion from their side.
If we decide to rename a constant, we aim to update it across all documentation pages.
Initially we were looking for @alias
but it's not existing in TypeDoc and this plugin could do almost the same alias in JSDoc. :3
from typedoc-plugin-replace-text.
But you still want to replace the name everywhere in the documentation, right? So basically you want to rename the variable reflection.
from typedoc-plugin-replace-text.
Yes, exactly.
from typedoc-plugin-replace-text.
I've given this some thought and have to tell you that I don't see this fit into the intention of this plugin. The requested functionality (renaming reflections) should imho be implemented in a separate plugin. It will most certainly also need additional options/settings (eg. specifying where you want things to get renamed and where not).
from typedoc-plugin-replace-text.
Related Issues (9)
- Feature request: Apply replace also to README's included with [[include]] HOT 7
- Could you release a version which is compatible with typedoc 0.24.x? HOT 4
- Plugin doesn't work HOT 4
- Feature Request: Replace with contents from a file HOT 9
- Option inIncludedFiles is too greedy HOT 2
- Include typings in package HOT 6
- Could you release a version which is compatible with typedoc 0.25.x? HOT 2
- Feature Request: Add path to current file in replacer function HOT 9
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-replace-text.