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

Convert project to TypeScript #175

Closed
seancdavis opened this issue May 2, 2021 · 3 comments
Closed

Convert project to TypeScript #175

seancdavis opened this issue May 2, 2021 · 3 comments
Labels
chore Something that adds value to the site, but happens under the hood wontfix This will not be worked on

Comments

@seancdavis
Copy link
Owner

This could be:

  • Beneficial for the site (most important)
  • A good learning exercise
  • Great fodder for an article
@seancdavis seancdavis added the chore Something that adds value to the site, but happens under the hood label May 2, 2021
@seancdavis
Copy link
Owner Author

I'd like to get there, but the process unfortunately isn't super straightforward. Here's a thread on the topic.

I don't want to sink a bunch of time into adjusting files that 1) work, and 2) have tests written to cover their behavior.

@seancdavis seancdavis added the wontfix This will not be worked on label Oct 1, 2021
@seancdavis seancdavis removed the wontfix This will not be worked on label Feb 3, 2022
@seancdavis
Copy link
Owner Author

seancdavis commented Feb 3, 2022

Did some more research and I think this is workable. After looking through this starter and recent comments on the referenced issue, I think it can be done, but there are going to be some hurdles.

Challenges

The challenges are:

Building a PoC

Here's how I would go about the process:

  1. Create a PoC app. That way I don't have to deal with all the craziness I have going on here right away.
  2. Build a super basic site. No TS.
  3. Add and configure TypeScript. Convert all JS to TS.
    • I might consider outputting JS to the same location as TS, so as to not complicate the directory structure.
    • I also don't know how to handle git in this situation. Do all files get tracked? Probably. Does it look messy? Probably. Is that okay? Maybe.
  4. Then wire up the TS build process with the 11ty build process. This likely requires adding types for 11ty. See here.
    • I'm not sure exactly what to do with the 11ty configuration file(s). I don't know if they have to go in the root or not.
  5. Introduce Slinkity with TSX components and CSS files, with Tailwind support.

Working into this Project

If I can get that working, then the next steps would be:

  1. Submit changes back to the starter?
  2. Make the foundational changes in my project without necessarily converting anything to TS.
  3. Make a couple TS conversions to ensure it's working.
  4. Convert Jest files to TS? Seems like it'd be nice to solve that together, but maybe a separate issue for that. TBD.

Once that works, this issue is largely solved. The changes could be merged. And I can make further TS conversions as I touch files.

Prerequisites

It seems like I'd want to complete the following before working this:

@seancdavis seancdavis reopened this Feb 3, 2022
@seancdavis seancdavis mentioned this issue Feb 3, 2022
@seancdavis
Copy link
Owner Author

This is not something I'm going to do until I move to a new framework. It's not worth the effort with 11ty.

@seancdavis seancdavis added the wontfix This will not be worked on label Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Something that adds value to the site, but happens under the hood wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant