Appearance
Development Guide
Prerequisites
- Node.js
>=24. - Corepack-enabled
pnpm. - A local checkout of this repository.
Install dependencies:
bash
pnpm installRepository Layout
src/: TypeScript source.test/: regression tests, schema fixtures, and validator helpers.docs/: maintained project documentation.demos/node: Node.js ESM demo.demos/vite-demo: React, TypeScript, and Vite demo.scripts/: build, package, demo, and smoke-test automation.tools/ooxml-validator: OOXML validator installer and wrapper.dist/: generated package runtime and declaration artifacts.
Do not hand-edit generated dist/ outputs unless the task explicitly asks to refresh release artifacts.
Common Commands
Build the source bundle used by tests:
bash
pnpm run buildTypecheck source:
bash
pnpm run typecheckRun regression tests:
bash
pnpm run test:unitCheck package contents:
bash
pnpm run package:lint
pnpm run pack:check
pnpm run test:packageSmoke-test the maintained demos against the built workspace package:
bash
pnpm run test:demosOOXML Changes
Before changing emitted OOXML, read OOXML agent context.
For serialization changes:
- Search the local source and tests first.
- Use the configured OOXML MCP server for schema structure, children, attributes, enums, namespaces, and OPC package metadata.
- Use the configured Microsoft Learn MCP server for PowerPoint and Open XML SDK behavior.
- Add or update a focused fixture in
test/schema.test.js. - Run schema validation:
bash
./tools/ooxml-validator/install.sh
pnpm run test:schemaPackage Boundary Changes
The package is ESM-only. Changes to package exports, generated filenames, or package contents should preserve the support contract documented in runtime and package support.
Package-boundary verification:
bash
pnpm run build
pnpm run package:lint
pnpm run pack:check
pnpm run test:packageDemo Changes
For Node demo changes:
bash
pnpm run test:demo:nodeFor Vite demo changes:
bash
pnpm run test:demo:viteFor both:
bash
pnpm run test:demos