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

[Fix Issue #691] Add TypeScript Support and Load MDX Routes #958

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

Mohsin-mw
Copy link
Contributor

[Fix Issue #691] Add TypeScript Support and Load MDX Routes

Description

Hello maintainers,

This pull request addresses and fixes Issue ##691, where we were required to add TypeScript support to the loadMdx.server.js file and enhance its functionality to load MDX routes recursively in a Remix app. Here are the changes made in this PR:

Changes Made

  1. TypeScript Conversion: Converted loadMdx.server.js to TypeScript and added type definitions for better code safety.

  2. Enhanced MDX Loading: Updated the code to load MDX files in a directory and generate a nested array of route attributes.

  3. Improved Comments and Documentation: Enhanced comments and documentation to provide better understanding of the code.

  4. Unit Tests: Implemented tests for loadMdxDirectory and loadMdxRouteFileAttributes functions to ensure correct functionality.

Motivation

The motivation behind these changes is to improve code maintainability and add support for TypeScript, which enhances the development experience by providing type checking and better code suggestions.

Testing

The code changes have been thoroughly tested locally to verify their correctness. Unit tests have been added to ensure the proper functioning of the functions.

How to Test

To test the changes locally, you can follow these steps:

  1. Clone this PR branch from my forked repository.

  2. Run the necessary setup and build commands.

  3. Execute the test suite using npm test or yarn test.

Request for Review

This PR is based on the latest changes from the upstream repository and is now ready for review and merging into the main branch.

Please take the time to review the changes and provide any feedback or suggestions. I am more than willing to make any necessary adjustments to ensure the quality and compatibility of the code.

Thank you for maintaining this amazing open-source project, and I look forward to contributing further!

Best regards,
MMW

@Mohsin-mw Mohsin-mw requested a review from a team as a code owner August 7, 2023 07:01
@netlify
Copy link

netlify bot commented Aug 7, 2023

👷 Deploy Preview for virtual-coffee-io processing.

Name Link
🔨 Latest commit 955387c
🔍 Latest deploy log https://app.netlify.com/sites/virtual-coffee-io/deploys/64d096b79f97e7000853bc45

Copy link
Member

@danieltott danieltott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great - thanks @Mohsin-mw !

@danieltott danieltott merged commit 5db7c8d into Virtual-Coffee:main Aug 29, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants