Skip to content

WIP: sync docs JS output from compiled examples#1255

Draft
jderochervlk wants to merge 10 commits intomasterfrom
test-examples-js-output-sync
Draft

WIP: sync docs JS output from compiled examples#1255
jderochervlk wants to merge 10 commits intomasterfrom
test-examples-js-output-sync

Conversation

@jderochervlk
Copy link
Copy Markdown
Collaborator

  • refactor: make test-examples importable
  • fix: restore test examples output
  • fix: make temp examples build writable
  • fix: handle spaced temp paths in test examples
  • feat: warn on stale JS output blocks

Restrict CodeTab JS-output pairing to explicit res example fences so plain res snippets are not treated as runnable examples.

Add a focused regression test for the pairing scanner and keep the design and implementation notes with the branch.
Describe the line-oriented --update workflow for JS Output blocks in CodeTab examples.

Document missing-fence insertion, single-label CodeTab upgrades, and README updates.
Implement --update in scripts/test-examples.mjs so JS Output fences can be refreshed, filled, or inserted for eligible CodeTab examples.

Add integration coverage for stale, empty, and missing JS fences plus single-label and multi-label CodeTab behavior, and document the new command in the README.
Invoke the local ReScript CLI directly instead of shelling through npm for each docs example build.

Format compiler failures as cleaned ReScript errors with markdown file locations and add regression coverage for both behaviors.
Commit the updated manual MDX files produced by the JS Output sync flow.

This commit includes only the tracked docs example updates and leaves unrelated code and untracked files out.
@github-actions
Copy link
Copy Markdown

Cloudflare deployment

Deployement ID: 41986148-e65b-450d-91ae-5fa657e4d04d
Deployment Environment: preview

⛅️ wrangler 4.63.0 (update available 4.83.0)
─────────────────────────────────────────────
✨ Compiled Worker successfully
Uploading... (7790/7845)
Uploading... (7808/7845)
Uploading... (7827/7845)
Uploading... (7845/7845)
✨ Success! Uploaded 55 files (7790 already uploaded) (2.54 sec)

✨ Uploading _redirects
✨ Uploading Functions bundle
🌎 Deploying...
✨ Deployment complete! Take a peek over at https://41986148.rescript-lang.pages.dev
✨ Deployment alias URL: https://test-examples-js-output-sync.rescript-lang.pages.dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant