add "Preview in LiveCodes" github actions #25
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 @KonnorRogers
This PR adds the feature of posting a comment for every push to PR with preview links in LiveCodes (as discussed in #23 ), using the "Preview in LiveCodes" GitHub action.
This is a screenshot from racing-bars repo.
3 files are added:
.github\workflows\livecodes-preview.yml
: builds the library and save the artifacts..github\workflows\livecodes-post-comment.yml
: posts the playground links as PR comments..livecodes\esm.json
: adds a sample project with the code you want in the playground.Notes
.livecodes\
directory. Each JSON file represents a LiveCodes configuration object. You have full control of what you want the playgrounds to do.Edit:
bundle/all.js
andtypes/index.d.ts
are converted to data urls and added in the link URL. The resulting ESM module is then used as import map in the playground to allow importing from'konnors-ninja-keys'
without having to publish it. So minifying the build can help make this more performant.Please let me know if you have any questions or comments.
Thank you.
Closes #23