question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[v2] Proposal: Official CodeSandbox Template

See original GitHub issue

Hi there! I’m part of the team over at @codesandbox and we’ve recently been working on a new feature set that allows our users to create their own custom Templates, which like our official templates allows them to quickly start a new project from pre-configured boilerplate code. This functionality is similar to what you might find in a CLI scaffolding tool, such as the one Docusaurus v2 features.

Recently I took the time to see if Docusaurus v2 would run inside of our container sandboxes, which it indeed does with the minor addition of a sandbox.config.json to specify the execution environment (without it, our GitHub importer defaults to react based on the project’s dependencies). You can check out an example template here:

https://codesandbox.io/s/docusaurus-template-8hm7z

This template was created by first using our GitHub importer, which allows us to take the content of any repository or a subfolder within a repository to quickly create a new sandbox. In this case, I simply ran your CLI tool to generate the new project files and added the above mentioned config file. Here’s an example from our templates repository and an import link to create a new sandbox from that repo:

https://github.com/codesandbox/codesandbox-templates/tree/master/packages/container/docusaurus-template

https://codesandbox.io/s/github/codesandbox/codesandbox-templates/tree/master/packages/container/docusaurus-template

One of our goals with Templates is that we want to empower framework developers to quickly add and maintain their own templates inside of CodeSandbox, which the community can then subscribe to in order to quickly create new sandboxes. We’re still nailing down the exact flow for linking a Template to a GitHub repository, but it is a key milestone on our roadmap as our plan is to move all of our official templates to repositories. The goal here is that we want to provide a better experience for users by allowing both framework maintainers and the open source community to quickly make updates and resolve issues without necessitating involvement on our part.

So as far as my proposal goes, Docusaurus could create and maintain their own custom template by adding a new package to the packages directory of this repository, which would contain the output from the CLI plus the required config file, similar to the example linked above. I’ll keep in contact and provide support in setting up a template based on that package once everything is in place on our end. From there, it would be the Docusaurus team’s responsibility to keep that package up to date, which would keep the linked template up to date as well.

I would very much like to hear your thoughts on this! Any feedback you might have would be highly appreciated!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:20 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
sammychinedu2kycommented, Oct 28, 2020

I’m going to work on this issue

1reaction
Saeriscommented, Oct 2, 2020

That sounds good to me! Let me know if you have any other questions and I’ll do my best to come up with solutions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Templates - CodeSandbox
CodeSandbox has a number of official templates, such as React, Vue, Angular, Gatsby, and others that you can use to quickly start a...
Read more >
jsbi examples - CodeSandbox
Learn how to use jsbi by viewing and forking jsbi example apps on CodeSandbox. ... paras-v2-landing ... Quantum Ledger Database Node.js sample application....
Read more >
babel/plugin-proposal-pipeline-operator examples
Learn how to use @babel/plugin-proposal-pipeline-operator by viewing and forking @babel/plugin-proposal-pipeline-operator example apps on CodeSandbox.
Read more >
babel/plugin-proposal-class-properties examples
Learn how to use @babel/plugin-proposal-class-properties by viewing and forking @babel/plugin-proposal-class-properties example apps on CodeSandbox.
Read more >
Create a new Sandbox - CodeSandbox
Sign in to create and bookmark templates for later use. Official Templates. React. by CodeSandbox↵.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found