This guide covers the development workflow for building, testing, and publishing the Rewrap Revived project. Rewrap Revived has three main components: an F# core (compiled to JS via Fable), a VSCode extension (TypeScript + Parcel), and a Visual Studio extension (C#).
| Tool | Version | Notes |
|---|---|---|
| .NET SDK | 6.0 | Required for Fable 3.6.2. SDK 8.0 does not work. |
| Node.js | 18+ recommended (tested up to 25) | |
| npm | Included with Node.js |
The build script auto-runs dotnet tool restore (installs Fable) and
npm install on first build, so you don't need to install these manually.
core/ F# wrapping logic, compiled to JS via Fable
vscode/ VSCode extension — TypeScript, bundled with Parcel
vs/ Visual Studio extension — C#
docs/ MkDocs documentation site + spec/test files
.config/do.mjs Build orchestrator, invoked via ./do (Unix) or do.cmd (Windows)
All development operations go through the ./do script. Run ./do with no
arguments to see available commands.
| Command | Description |
|---|---|
./do clean |
Remove build artifacts |
./do build |
Development build (Fable + Parcel) |
./do test |
Build then run core + VSCode tests |
./do prod |
Production build (tests, ESLint, optimized bundle) |
./do watch |
Concurrent Fable, TypeScript, and Parcel file watchers |
./do package |
Create .obj/Rewrap-VSCode.vsix |
./do prepublish |
Clean build, version bump, changelog prep |
./do publish |
Package and publish to Marketplace + OpenVSX |
Each operation implies its predecessors — test builds first, prod tests
first, package implies prod, and so on.
Component targeting: Commands accept core or vscode to build/test only
one component:
./do build core # Only build the F# core
./do build vscode # Only build the VSCode extension
./do test core # Only run core testsPass --verbose or -v for detailed output.
./do buildThis builds both core and vscode. On first run it restores dotnet tools and npm dependencies automatically.
Core (F# via Fable):
dotnet restore(if needed)dotnet fable— transpiles F# to JavaScript incore/dist/dev/
VSCode extension (TypeScript + Parcel):
npm installinvscode/(if needed)tsctype-check (no emit)- Parcel bundles to
vscode/dist/Extension.js
./do prodAdds ESLint, removes source maps, produces optimized bundles. This is equivalent to what CI runs.
The VS extension uses the F# Core project directly (not Fable). Open
Rewrap.sln in Visual Studio and build vs/VS.csproj.
./do testThis builds first, then runs both core spec tests and VSCode integration tests.
./do test coreThe core tests use a spec-as-test system: markdown files in docs/specs/
contain input/expected-output pairs that double as feature documentation. The
test runner parses these files and validates wrapping behavior.
See Specs for the full test format documentation.
To isolate a single test for debugging, add <only> to any line of that test.
Remove it before committing.
./do test vscodeUses @vscode/test-electron to launch a real VSCode instance and run
assertions against the VSCode API (settings resolution, basic wrapping).
!!! warning Integration tests cannot run from inside VSCode's integrated terminal. The script detects this and skips with a warning. Run from an external terminal instead.
- Open the Rewrap Revived project in VSCode.
- In the Run and Debug panel, select the "Extension" launch configuration.
- Press F5 — a new Extension Development Host window opens with Rewrap loaded.
- Test wrapping with
Alt+Qin a comment block.
All launch configurations run the "Build extension" pre-launch task
(./do build vscode) automatically.
Available launch configurations:
| Configuration | Purpose |
|---|---|
| Extension | Manual e2e testing in a dev VSCode window |
| Web Extension | Test as a web/browser extension |
| Core Tests | Debug core spec tests with breakpoints |
| Extension Tests | Debug VSCode integration tests with breakpoints |
./do watchRuns three concurrent watchers for fast feedback during development:
- Fable — rebuilds core and auto-runs core tests on F# changes
- TypeScript — continuous type-checking
- Parcel — continuous VSCode extension bundling
After starting watch mode, press F5 in VSCode to launch the Extension Development Host. Changes rebuild automatically; reload the dev host window to pick them up.
./do packageRuns a production build and outputs .obj/Rewrap-VSCode.vsix.
- Prepare:
./do prepublish— clean build, version bump, prints instructions to editCHANGELOG.md. - Edit changelog: Update
CHANGELOG.mdwith the new version's changes. - Publish:
./do publish— validates changes, packages, publishes to both the VS Code Marketplace (viavsce) and OpenVSX (viaovsx).
Required environment variables:
| Variable | Purpose |
|---|---|
GITHUB_PAT |
GitHub releases |
OVSX_PAT |
OpenVSX publishing |
Even major version = stable release, odd major version = pre-release. Version is
stored in vscode/package.json and synced to vs/source.extension.vsixmanifest
and README.md during prepublish.
GitHub Actions (.github/workflows/main.yml) runs on every push and pull
request:
./do build test --production
This performs a full production build and runs all tests. Integration tests run under xvfb to provide a virtual display for the VSCode instance.
To reproduce CI locally:
./do prod