JSON standard for documenting web component libraries for IDEs, documentation generators and other tools
285
stars
25
forks
source link
When running vue-docgen-web-types in watch mode on Windows, file changes do not take effect #73
Closed
anyesu closed 1 year ago
Describe the bug
Run on Windows.
filePath from glob is POSIX style :
changedFilePath from chokidar is Windows style :
So when calling cachedContent[filePath] = ... , new content will be added instead of replace, because the key is different.
https://github.com/JetBrains/web-types/blob/8b566c3bb87b2a45dd6bbc19c7106e689453e125/gen/vue-docgen-web-types/src/build.ts#L76-L79
Reproduction
https://stackblitz.com/edit/vitejs-vite-eqvcdt?file=src%2Fcomponents%2FHelloWorld.vue&terminal=dev
Steps to reproduce
Download Project and run on Windows .
You can see the
web-types.json
file in the root directory:Then modify the JSDoc in
src\components\HelloWorld.vue
, theweb-types.json
will be auto updated:You can see that there are two tags with the same name
HelloWorld
, but with differentdescription
attribute.So the old content will be matched when IDEA load the
web-types.json
file, because it is written in the front.