-
Notifications
You must be signed in to change notification settings - Fork 54
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
getContentfulEnvironment.js #33
Comments
I didn’t want |
@stevenpetryk ts-node already is a dependency https://github.com/intercom/contentful-typescript-codegen/blob/master/package.json#L68 |
Yep! But it’s a devDependency—users don’t download it just by using this library. |
@stevenpetryk Was about to correct myself. Also I was posting to the wrong repo anyways! I realized this file is a relic of my attempting to use this before. With Gatsby I've used graphql-codegen, because (I think) this doesn't work with Gatsby+Contentful setup |
@stevenpetryk would you be open to supporting using TypeScript with I've implemented this in a few projects like jest & postcss, and would be happy to do it again here if you're happy with that :) |
Hi @G-Rath, I don't work at Intercom anymore and so I cannot make changes to this project. I would recommend tagging a recent committer. |
Hi @G-Rath 👋🏻 I'd be interested in seeing how that would work! I'd be open to that as long as we keep backwards compatibility 😃 Would you mind going in a bit more detail on how your proposal would work? Or maybe if it's easier you can create a PR with your proposal and tag me there! |
@GabrielAnca no problem - I'll look at doing a PR over the weekend. The general way it's implemented is by doing a require for The implementation generally ends up looking something like this:
There's some variation depending on how the config loading is actually done which I've not looked at yet e.g. for (tbh it's getting to the point where I've been considering publishing a package for handling it, because of how similar the core code is 🙈) |
Looking over the codebase, I think it should be a matter of wrapping these lines in some logic mixed with the above. What I can't see is an interface that defines what the config should look like as this is type |
@GabrielAnca I just realised that this is using TypeScript 3 - would you be interested in me upgrading it to use v4? (and prettier?) |
🎉 This issue has been resolved in version 3.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Why is it js instead of ts?
The text was updated successfully, but these errors were encountered: