-
Notifications
You must be signed in to change notification settings - Fork 10
feat(docs): add docs-extractor packages #269
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
base: main
Are you sure you want to change the base?
Conversation
- Added TypeExtractor class to orchestrate the extraction of component type information. - Introduced specialized analyzers: ComponentAnalyzer, PropsAnalyzer, VanillaExtractAnalyzer, and ExternalTypeResolver. - Created utility functions for TypeScript analysis and component extraction. - Developed a main function to handle file processing and output generation in JSON format. - Added types and interfaces for component type information and extraction configuration. - Integrated support for Vanilla Extract CSS files to extract default values and styling information. - Established a configuration file for TypeScript compilation settings. - Updated package dependencies and lock file to include necessary libraries for functionality.
…ction - Removed legacy order.json configuration file. - Enhanced types.ts with new interfaces for component and prop information. - Updated tsconfig.json to include path mapping for improved module resolution. - Created comprehensive README.md detailing the new architecture and usage. - Implemented CLI tool for extracting component types from specified files. - Developed ComponentAnalyzer for extracting display names and default elements from React components. - Introduced ExternalTypeResolver for resolving external type definitions from npm packages. - Built PropsAnalyzer for extracting prop information, including types and default values. - Refactored TypeExtractor to orchestrate the extraction process using various analyzers. - Added utility functions for TypeScript analysis, including JSDoc extraction and type parsing. - Integrated Vanilla Extract support for CSS-in-JS styling analysis.
- Removed the ComponentAnalyzer and ExternalTypeResolver classes, replacing them with standalone functions in new files. - Introduced PropsAnalyzer for extracting props information from TypeScript types. - Created a new type-extractor module to handle TypeScript program creation and component type extraction. - Updated index.ts to reflect new module structure and exports. - Removed legacy VanillaExtractAnalyzer and replaced it with utility functions for CSS file handling. - Cleaned up unused utility functions and consolidated prop extraction logic. - Updated tsconfig.json for improved path resolution.
…tion and updating utils imports
…pty and simplifying patterns handling
…y only when necessary
…w parser utilities and restructuring component handling
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Summary of ChangesHello @MaxLee-dev, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a dedicated documentation extraction package to enhance the project's documentation workflow. By programmatically analyzing TypeScript component definitions, the new tool automates the generation of API documentation, ensuring that the website's component reference is always up-to-date and accurately reflects the codebase. This change significantly improves the efficiency and reliability of maintaining comprehensive component documentation. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
새로운 docs-extractor 패키지 추가는 매우 유용한 기능입니다. 전반적인 아키텍처는 모듈식으로 잘 구성되어 있고 TypeScript 컴파일러 API를 활용한 점이 좋습니다. 다만, 성능 및 정확성과 관련된 몇 가지 중요한 이슈를 발견했습니다. 또한 리팩토링, 문서 정확성 개선, 불필요한 코드 제거가 필요한 부분들이 있습니다. 아래의 상세 리뷰를 통해 각 항목을 확인해주세요.
packages/docs-extractor/src/handler/external-packages-handler.ts
Outdated
Show resolved
Hide resolved
…-components-tsdocs
… initialization outside the loop
…ctions; refactor package.json for typescript-api-extractor; enhance error handling in CLI; remove legacy type parsing function
…lProp for prop inclusion logic
…-docs-extractor
…p types in extractFullUnionTypes function
- Deleted ESLint configuration file as it is no longer needed. - Removed package.json and TypeScript configuration files, cleaning up the project structure. - Eliminated CLI implementation and related handlers for component extraction. - Removed parser utilities and types related to component and prop extraction. - Cleaned up utility functions and external type parsing logic. - Updated pnpm lock file to reflect dependency changes.
…omponent JSON files with props definitions
Related Issues
Description of Changes
Checklist
Before submitting the PR, please make sure you have checked all of the following items.