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

Developer API for versioning / deploying REPL examples #842

Open
bryanmylee opened this issue May 11, 2022 · 0 comments
Open

Developer API for versioning / deploying REPL examples #842

bryanmylee opened this issue May 11, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@bryanmylee
Copy link

The process of managing, updating, and deploying code examples with the REPL is quite fragile and cumbersome.

A simple developer API for managing project examples and deploying them to the REPL would be nice. It should also provide a unified experience for Svelte package developers to provide

Features

Ideally, we would want certain features to streamline the process of building documentation examples.

  1. Let users specify a project folder on the REPL to store all examples for a given project (this would require an extension to the REPL for folders)
  2. Generate an access token to allow writes to the project folder for CI / CD.
  3. Configure the documentation project to specify the project ID.
  4. Write code examples as Svelte files with some metadata to specify the example ID, Svelte environment, REPL title, etc.
  • We could even automatically resolve imports to include all the required files for an example
  1. Provide a custom store / component that gets a link to the correct REPL when given the example ID, which the user can then embed in their documentation
  • This could even be a re-direct link in the format of svelte.dev/repl/{project-id}/{example-id}
  1. Provide CI tools to deploy code examples onto the REPL

Benefits

It encourages Svelte package developers to more readily provide code examples due to the accessibility of the REPL. In the long run, it should improve the Svelte ecosystem.

Potential issues

Given the niche applicability of the use case, the added complexity to the REPL might not be warranted.

This may also not be in the spirit of the REPL, as it should be a simple playground to try new Svelte things. However, the complexity should be completely hidden to average users and the end experience should remain simple.

@bluwy bluwy added the enhancement New feature or request label May 11, 2022
@benmccann benmccann transferred this issue from sveltejs/sites Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants