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 gatsby-theme-ui-layout to TypeScript #710

Closed

Conversation

epilande
Copy link
Contributor

@epilande epilande commented Feb 24, 2020

Convert gatsby-theme-ui-layout to TypeScript.

Related to #668.

Since this gets consumed as a Gatsby theme, I don't think it needs to be compiled.
I tested this out with gatsby-theme-ui-blog (which is still in JavaScript) and it works just like before 😃

@epilande epilande requested a review from mxstbr February 24, 2020 01:54
@mxstbr mxstbr mentioned this pull request Mar 1, 2020
32 tasks
@mxstbr
Copy link
Member

mxstbr commented Mar 1, 2020

Since this gets consumed as a Gatsby theme, I don't think it needs to be compiled.

Are Gatsby themes able to compile TypeScript? What if they use TypeScript options the package doesn't support? 🤔

@epilande
Copy link
Contributor Author

epilande commented Mar 3, 2020

@mxstbr oops I lied. I tried it out with a clean gatsby install and it didn’t work.. I thought it was magic :P

@jxnblk
Copy link
Member

jxnblk commented Mar 3, 2020

Sounds like it might make sense to leave the Gatsby plugins & themes in JS to avoid needing to compile them for the time being, right?

@epilande
Copy link
Contributor Author

epilande commented Mar 4, 2020

@jxnblk yeah, another option could be to set up gatsby-config with gatsby-plugin-typescript, though this package is bare bones and that it might not be worth it

@jxnblk
Copy link
Member

jxnblk commented Mar 4, 2020

My guess is that it might not be worth it for the time being. One (small) nice thing about shipping the source code is that users can view more human-readable code in node_modules, which also is nice for some potential tooling we could build for shadowing (if that makes sense).

If Gatsby supports .ts in plugins/themes in the future, then I think it could make sense to convert these over.

@epilande
Copy link
Contributor Author

epilande commented Mar 4, 2020

Yeah 💯 agree. Closing for now

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.

3 participants