Files
markitect-main/roadmap/testdrive-jsui-publication/PLAN.md
tegwick b7e11461f4 chore: rename markitect_project to markitect-main across project
Finishes the in-progress rename so docs, configs, tests, and capability
manifests all reference the current repo name consistently. Fixes two
tests (test_roundtrip_consolidated.py, test_issue_140_roundtrip_simplified.py)
whose hardcoded cwd paths would have broken under the renamed directory.

Archival content under history/, reports/, and roadmap/eat-the-frog/, plus
derived artifacts (.venv_old/, node_modules/, asset_registry.json) are
intentionally left untouched.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 01:57:35 +02:00

177 lines
5.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# TestDrive-JSUI — npm Publication
## Context
TestDrive-JSUI is a JavaScript-first markdown editor library living at
`capabilities/testdrive-jsui/`. Phases 16 (build system, bundling, testing,
migration) are complete. 84 tests pass (68 JS + 15 Python + 1 fixes).
Single source of truth: `capabilities/testdrive-jsui/js/`.
This workstream covers the remaining work to publish the library to npm and
close out the capability.
**Source:** `capabilities/testdrive-jsui/TODO.md` (Phases 79)
**Package name:** `testdrive-jsui` (to be confirmed in P.1)
**Current version:** 1.0.0
---
## Tasks
### P.1 — Pre-publication: decide repository structure
The library currently lives inside the markitect monorepo. Before publishing to
npm, decide whether it ships from here or from a dedicated repo.
**Options:**
- A: Publish directly from `capabilities/testdrive-jsui/` — simpler, no repo split
- B: Extract to a standalone `testdrive-jsui` repo — cleaner for npm consumers
Record the decision and proceed accordingly.
**Acceptance:** Decision recorded; if B, standalone repo created and code copied.
---
### P.2 — Pre-publication: verify Markitect integration
Confirm the main Markitect application still works correctly with the current
capability code before publishing.
```bash
cd /home/worsch/markitect-main
make testdrive-jsui-test-all # 84 tests must pass
# Manually verify view and edit modes in the running Markitect app
```
**Acceptance:** All 84 tests pass; view and edit modes confirmed working.
---
### P.3 — Pre-publication: decide STANDALONE_PLAN.md
`STANDALONE_PLAN.md` exists in the capability but its status is unclear. Either:
- Implement it (if it describes meaningful standalone work)
- Explicitly archive it with a note that the standalone use case is covered by the npm package
**Acceptance:** File updated with a clear status note; or deleted if obsolete.
---
### P.4 — Pre-publication: pack and dry-run
Run the full pre-publish checklist.
```bash
cd capabilities/testdrive-jsui
npm run lint # zero errors
npm test # all 84 tests pass
npm run build:prod # clean production build
npm pack # creates testdrive-jsui-1.0.0.tgz
npm install ./testdrive-jsui-1.0.0.tgz --dry-run # verify install
npm publish --dry-run # verify what will be published
```
Review `--dry-run` output: confirm only intended files are included (check
`.npmignore` or `files` field in `package.json`).
**Acceptance:** `npm publish --dry-run` succeeds with expected file list; no
test files, source maps, or internal docs included unintentionally.
---
### P.5 — Pre-publication: create release tag
```bash
git tag -a v1.0.0 -m "Release testdrive-jsui v1.0.0"
# (push tag to remote when ready)
```
**Acceptance:** Tag `v1.0.0` exists on main; CHANGELOG.md entry present for 1.0.0.
---
### P.6 — Publication: publish to npm
```bash
cd capabilities/testdrive-jsui
npm login # if not already logged in
npm publish
```
Then verify:
- Package visible at `https://www.npmjs.com/package/testdrive-jsui`
- Wait 510 minutes, then check CDN availability:
- `https://cdn.jsdelivr.net/npm/testdrive-jsui@1.0.0/dist/testdrive-jsui.min.js`
- `https://unpkg.com/testdrive-jsui@1.0.0/dist/testdrive-jsui.min.js`
**Acceptance:** Package installable via `npm install testdrive-jsui`.
---
### P.7 — Publication: fresh install test
In a clean temporary directory, install from npm and verify the library works
with a minimal HTML file.
```bash
mkdir /tmp/testdrive-test && cd /tmp/testdrive-test
npm install testdrive-jsui marked
# Open standalone.html equivalent, confirm editor initialises
```
**Acceptance:** `new TestDriveJSUI({...})` works in a fresh install with no
reference to the capability source directory.
---
### P.8 — Publication: GitHub release
Create a GitHub release from the v1.0.0 tag with:
- Release notes (summary from CHANGELOG.md 1.0.0 entry)
- Link to npm package
- Link to CDN URLs (jsdelivr, unpkg)
**Acceptance:** GitHub release published and visible.
---
### P.9 — Post-publication: README badges and monitoring
Add npm badges to `capabilities/testdrive-jsui/README.md`:
```markdown
[![npm version](https://badge.fury.io/js/testdrive-jsui.svg)](...)
[![npm downloads](https://img.shields.io/npm/dm/testdrive-jsui.svg)](...)
```
Set a reminder to check download stats after 1 week.
Demo page and GitHub Pages are optional — do only if there's a specific audience
to point at it.
**Acceptance:** README has version and download count badges; committed.
---
## Task order
```
P.1 (repo decision)
P.2 (Markitect integration check) ← can run in parallel with P.1
P.3 (STANDALONE_PLAN decision) ← can run in parallel
P.4 (pack + dry-run) ← needs P.1, P.2, P.3 all done
P.5 (release tag) ← can run with P.4
P.6 (publish)
P.7 (fresh install test)
P.8 (GitHub release)
P.9 (badges + monitoring)
```
## Out of scope
- Adding new features before publication (ship what's there)
- Ruby or Java adapters (optional integrations, not blocking publication)
- Paid npm features (keep on free tier)