Skip to content

Added support for Codesandbox - #3702

Closed
sammychinedu2ky wants to merge 5 commits into
meta:masterfrom
sammychinedu2ky:master
Closed

sammychinedu2ky wants to merge 5 commits into
meta:masterfrom
sammychinedu2ky:master

Conversation

@sammychinedu2ky

Copy link
Copy Markdown
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
Copy Markdown
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 [email protected]. Thanks!

@netlify

netlify Bot commented Nov 6, 2020 •

Copy link
Copy Markdown

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

Copy link
Copy Markdown
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

slorber commented Nov 6, 2020

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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

sammychinedu2ky commented Nov 9, 2020 •

Copy link
Copy Markdown
Contributor Author

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

slorber commented Nov 9, 2020

Copy link
Copy Markdown
Collaborator

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

sammychinedu2ky commented Nov 9, 2020 via email

Copy link
Copy Markdown
Contributor Author

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