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

feat(template): add react typescript #114

Merged

Conversation

andreifloricel
Copy link
Contributor

@andreifloricel andreifloricel commented Oct 30, 2021

What kind of change does this pull request introduce?

Resolves #108

What is the new behavior?

Provide a predefined template for react with out-of-the-box support for typescript

What steps did you take to test this? This is required before we can merge, make sure to test the flow you've updated.

Extended Storybook

Checklist

  • Documentation "N/A"
  • Ready to be merged

The public API of 'sandpack-client' has changed (added new param for 'devDependencies'). Not sure how the release process works but the ts-ignore from sandpackUtils.ts has to go.
Also prettier added some formatting but I can only assume the previous code was incorrectly formatted.

@vercel
Copy link

vercel bot commented Oct 30, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/codesandbox/sandpack/A6JLuGnaYv7YAeE7HnDc1XDGdXU5
✅ Preview: Failed

[Deployment for e3d612f failed]

@vercel vercel bot temporarily deployed to Preview October 30, 2021 20:43 Inactive
@danilowoz
Copy link
Member

This really is awesome! I'll review and leave my thoughts as soon as I can. @alexnm who is the best person to review the client changes?

@danilowoz danilowoz self-requested a review November 2, 2021 09:19
@vercel vercel bot temporarily deployed to Preview November 2, 2021 10:31 Inactive
@andreifloricel
Copy link
Contributor Author

Thanks! I just pushed a small update to the client changes as I noticed that my previous implementation was a bit over-enginereed.

@vercel vercel bot temporarily deployed to Preview November 2, 2021 10:39 Inactive
Copy link
Collaborator

@alexnm alexnm left a comment

Choose a reason for hiding this comment

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

Great work Andrei! Thank you for your contribution, left a few notes, then we can soon merge this.

sandpack-react/src/types.ts Outdated Show resolved Hide resolved
sandpack-react/src/utils/sandpackUtils.ts Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview November 3, 2021 12:40 Inactive
@andreifloricel andreifloricel changed the title Add react typescript template feat: add react typescript template Nov 4, 2021
Copy link
Member

@CompuIves CompuIves left a comment

Choose a reason for hiding this comment

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

Super nice addition! Happy to see React-TS in here 😄 .

@andreifloricel
Copy link
Contributor Author

Thank you! Glad I can contribute something, after using codesandbox so many times :)
I'm not sure how the PR process goes forward. I see that the Vercel deployment failed, but I don't have access to its logs

@andreifloricel
Copy link
Contributor Author

Hmm, as I created #127 and checked the existing codesandbox & sandpack templates I realised that all sandpack templates (except react) follow the sandbox structure in the sense that source files are placed under the /src directory.:
ex. Vue https://codesandbox.io/s/ecstatic-ptolemy-gxt88 & https://github.com/codesandbox/sandpack/blob/main/sandpack-react/src/templates/vue.ts#L5

Maybe I should adjust the react-ts template to have the same structure and be consistent with all the other ones?
@CompuIves @alexnm what's your take on this?

@alexnm
Copy link
Collaborator

alexnm commented Nov 10, 2021

Hmm, as I created #127 and checked the existing codesandbox & sandpack templates I realised that all sandpack templates (except react) follow the sandbox structure in the sense that source files are placed under the /src directory.: ex. Vue https://codesandbox.io/s/ecstatic-ptolemy-gxt88 & https://github.com/codesandbox/sandpack/blob/main/sandpack-react/src/templates/vue.ts#L5

Maybe I should adjust the react-ts template to have the same structure and be consistent with all the other ones? @CompuIves @alexnm what's your take on this?

I don't know if we have any constraints here, but I would follow the template that is used by codesandbox.io for now

@vercel vercel bot temporarily deployed to Preview November 10, 2021 09:12 Inactive
@andreifloricel
Copy link
Contributor Author

Agreed, I adjusted it.

@danilowoz danilowoz changed the title feat: add react typescript template feat(template): add react typescript Nov 10, 2021
@danilowoz danilowoz merged commit 96aaac8 into codesandbox:main Nov 10, 2021
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.

Add react-ts template
4 participants