Fix docs deployment asset path and enable live bidirectional conversion in demo - #3
Merged
Merged
Conversation
Closed
Copilot
AI
changed the title
[WIP] Fix docs deployment to include index.js file
Fix docs deployment asset path and enable live bidirectional conversion in demo
Jun 8, 2026
wmertens
marked this pull request as ready for review
June 8, 2026 12:16
There was a problem hiding this comment.
Pull request overview
This PR updates the GitHub Pages docs deployment so the demo page can load the JSURL runtime from within the deployed docs/ artifact, and enhances the demo UX by running JSON↔JSURL conversion live while typing.
Changes:
- Update the Pages workflow to build the library and publish the browser runtime into
docs/. - Switch the demo page to load
./index.jsand addoninputhandlers for continuous bidirectional conversion. - Remove the stale “Live editor” link from the README and add a regression test covering the docs demo wiring.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/docs.test.ts |
Adds a docs regression test asserting the demo’s runtime path and live oninput conversion hooks. |
README.md |
Removes an outdated “Live editor” link. |
docs/index.html |
Loads runtime from ./index.js and enables live conversion via oninput handlers. |
.github/workflows/static.yml |
Builds the library during Pages deploy and copies the runtime into docs/ before uploading. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1
to
+10
| import fs from 'node:fs' | ||
| import path from 'node:path' | ||
|
|
||
| import {describe, expect, test} from 'vitest' | ||
|
|
||
| describe('docs demo page', () => { | ||
| const docsIndex = fs.readFileSync( | ||
| path.resolve(__dirname, '../docs/index.html'), | ||
| 'utf8', | ||
| ) |
Comment on lines
+35
to
+39
| run: | | ||
| corepack enable | ||
| corepack pnpm install --frozen-lockfile | ||
| corepack pnpm build | ||
| cp dist/index.js docs/index.js |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Docs are now deployed from
docs/, but the demo page still loaded JSURL from../dist/index.js, which is absent in Pages artifacts. This updates deployment to publish the runtime intodocs/and makes JSON↔JSURL conversion run continuously while typing.Docs deployment artifact
dist/index.jstodocs/index.jsso the demo has its runtime in deployed artifacts.Demo page runtime + live editing
../dist/index.jsto./index.js.oninputhandlers on both textareas to perform immediate conversion in both directions.README cleanup
Live editor: https://cv122s.csb.app/entry.Focused regression coverage
./index.jsoninputconversion hooks are present