Update codesandbox template automatically

Frontity Roadmap :biking_man:

Feature Card

Description

Right now we have to update the codesandbox template manually. It’d be update it automatically each time we release a new version.

User stories

As a Frontity developer
I want to use always the latest versions on codesandbox,
so that I can test my code with the latest Frontity version.

As a core developer
I don’t want to manually update the codesandbox template on each release
so that it’s always up to date.

This feature depends on the next ones:

We’ll keep you posted on this topic once they are released and this feature is available.

I’ve been testing this because Codesandbox now supports using GitHub repositories as templates changing the github.com domain with a githubbox.com domain.

The only thing a Frontity project needs now is a sandbox.config.json file with this configuration:

{
  "template": "node"
}

I’ve added it to the Frontity Chakra theme:

It works great.

I’ve also asked if they plan to add support for this configuration in the package.json file. If they do, maybe we could add it to the package.json we generate with npx frontity create and that would make every Frontity repository a codesandbox template.

We still need to figure out how to keep our own repos/templates up to date (what this Feature Discussion is about).

1 Like

@documentation-team maybe you could add the sandbox.config.json file to all our demos and a link to “Edit it in Codesandbox” like what we have in our website.

What do you think?

@juanma has already opened an issue for this: https://github.com/frontity/docs/issues/158 :clap::clap:

If you have any problems let me know.

I’ve added another one to add a section to our (already awesome) “How to share your Frontity project” guide: https://github.com/frontity/docs/issues/159

By the way, our template was way out of date so I’ve just updated it: https://github.com/frontity/frontity-codesandbox

Hopefully we can do something to automate this in the future :slightly_smiling_face:

EDIT: This link can be used to start it: https://githubbox.com/frontity/frontity-codesandbox

Done! More details at: https://github.com/frontity/docs/issues/158#issuecomment-689404377

Awesome :clap: :smiley: