This repository has been archived by the owner on Sep 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 152
Bring examples into solid-docs (as individual files) #192
Open
aercolino
wants to merge
27
commits into
solidjs:main
Choose a base branch
from
aercolino:split-js-files
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- the new "/examples/" folder will contain only the JSON files generated by the rollup plugin
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi guys.
I was studying SolidJS and wanted to improve some examples, but then I found out that each example's files were packed into a JSON file with an array of files sources (I call it a JSON-folder file). Additionally, only the examples lived in the solid-site repo, while all the other docs did in the solid-docs repo.
So this is my small proposal for bringing all the examples from
solid-site/public/examples
tosolid-docs/lang/en/examples-src
as individual files.Notice that all the examples are imported without any changes: I only added some code
/examples/:id
routeRepos comparisons:
Pieces of the puzzle:
name
,description
, andfiles
propsfiles
props is an array of the published filenames, and their published ordersolid-docs/langs/en/examples-src
tosolid-docs/langs/en/examples
generate-json-folders.js
pluginSourceFile
andExample
getExample
andgetExamplesDirectory
solid-docs/langs/en/examples/some-example.json
andsolid-docs/langs/en/examples/$descriptor.json
respectively/examples/:id
(just like before)getExamplesDirectory
andgetExample
functions, imported from solid-docs/examples/:id
and uses its data (just like before)