Skip to content

Latest commit

 

History

History
127 lines (92 loc) · 2.45 KB

File metadata and controls

127 lines (92 loc) · 2.45 KB
doc-schema-version 1
title Development Guide
summary Setup, source layout, generated outputs, and contribution rules.
read_when
Setting up the repository
Changing source layout or generated output policy
Updating development commands
doc_type guide

Development Guide

Prerequisites

  • Node.js >=24.
  • Corepack-enabled pnpm.
  • A local checkout of this repository.

Install dependencies:

pnpm install

Repository 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:

pnpm run build

Typecheck source:

pnpm run typecheck

Run regression tests:

pnpm run test:unit

Check package contents:

pnpm run package:lint
pnpm run pack:check
pnpm run test:package

Smoke-test the maintained demos against the built workspace package:

pnpm run test:demos

OOXML Changes

Before changing emitted OOXML, read OOXML agent context.

For serialization changes:

  1. Search the local source and tests first.
  2. Use the configured OOXML MCP server for schema structure, children, attributes, enums, namespaces, and OPC package metadata.
  3. Use the configured Microsoft Learn MCP server for PowerPoint and Open XML SDK behavior.
  4. Add or update a focused fixture in test/schema.test.js.
  5. Run schema validation:
./tools/ooxml-validator/install.sh
pnpm run test:schema

Package 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:

pnpm run build
pnpm run package:lint
pnpm run pack:check
pnpm run test:package

Demo Changes

For Node demo changes:

pnpm run test:demo:node

For Vite demo changes:

pnpm run test:demo:vite

For both:

pnpm run test:demos