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

Added support for Codesandbox #3702

Closed
wants to merge 5 commits into from
Closed

Added support for Codesandbox #3702

wants to merge 5 commits into from

Conversation

sammychinedu2ky
Copy link
Contributor

Motivation

I saw an issue on adding Codesandbox config for Docusaurus which would enable the creation of Codesandbox templates for Docusaurus.
So I decided to work on that.

Have you read the Contributing Guidelines on pull requests?

Yes

@facebook-github-bot
Copy link
Contributor

Hi @sammychinedu2ky!

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.

In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@netlify
Copy link

netlify bot commented Nov 6, 2020

Deploy preview for docusaurus-2 ready!

Built without sensitive environment variables with commit e8b67f1

https://deploy-preview-3702--docusaurus-2.netlify.app

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Nov 6, 2020
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@slorber
Copy link
Collaborator

slorber commented Nov 6, 2020

Hi @sammychinedu2ky

That looks nice, but can you help me figure out how to test your code to be sure it's correct to be merged? (assuming I don't know much about CodeSandbox?)

@sammychinedu2ky
Copy link
Contributor Author

I have an issue using this. I'm sorry about that.
Codesandbox doesn't allow more than 500 modules in a sandbox.
But funny enough it allows me to make use of the cli tool to create a template.
The issue I face with this is that making a template update won't be automatic

@sammychinedu2ky
Copy link
Contributor Author

sammychinedu2ky commented Nov 9, 2020

Is it okay for me to add a GitHub workflow that creates a template folder for any merge or commit made to the repo (master branch)
With this integration I would be able to add an automatic support for codesandbox to read a template from the generated template folder in the Docusaurus repo
So I want to know if that is okay to add.

@slorber slorber linked an issue Nov 9, 2020 that may be closed by this pull request
@slorber
Copy link
Collaborator

slorber commented Nov 9, 2020

As explained on Discord, you should:

  • create a yarn script examples:generate to init all the available templates and create those folders: ./examples/classic, ./examples/bootstrap, ./examples/facebook
  • commit these folders
  • add examples/* in yarn workspace folders (in root package.json)
  • add the codesandbox config in ./examples/classic
  • see if you can import the repo on CodeSandbox
  • add ./examples/classic on Netlify deploy previews for easy review

We'll figure out later how to automate the process so that examples:generate is run automatically, but for now, the goal is to have something working on CodeSandbox

@sammychinedu2ky
Copy link
Contributor Author

sammychinedu2ky commented Nov 9, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[v2] Proposal: Official CodeSandbox Template
4 participants