API Documentation via Custom Elements Manifest (CEM) #603
rmenner
started this conversation in
Technical Research Documents
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
This document outlines the Auro Design System's migration from Web Component Analyzer (WCA) to Custom Elements Manifest (CEM) as our core documentation generation strategy. This change addresses two critical WCA limitations: inheritance handling gaps and incompatibility with modern package delivery that excludes un-compiled source code. The migration maintains existing API documentation format while enabling future tooling integrations.
Background & Problem Statement
Previous Approach: Web Component Analyzer (WCA)
The Auro Design System previously relied on Web Component Analyzer (WCA) for generating API documentation. While WCA initially served our needs, two critical limitations became increasingly problematic as our component library evolved in complexity and our build/distribution strategy modernized.
Why We Had to Switch
Critical Limitation: Inheritance Support
WCA could not process inherited properties, methods, or attributes from parent classes. This meant that:
Additionally, as the Auro Design System shifted to a more modern package delivery approach, we no longer shipped un-compiled source code. The old WCA tool could gather JSDoc information because it previously existed in the published packages, but this change in our build and distribution strategy meant WCA could no longer access the necessary source information for proper analysis.
Solution: Custom Elements Manifest (CEM)
What is CEM?
Custom Elements Manifest is a standardized file format for describing custom elements, developed by the web components community. It provides a machine-readable schema that captures the complete API surface of web components, including:
Key Benefits
Problems Solved
Technical Implementation
Core Technology Stack
@custom-elements-manifest/analyzer- Generatescustom-elements.jsonfiles from source codeArchitecture Overview
Implementation Scope
api.mdstructure and formattingLevel of Effort
Initial Implementation
Key Implementation Challenges
Future Opportunities
Planned Integrations
With CEM as our foundation, we can leverage the rich ecosystem for:
Ecosystem Benefits
Success Metrics
Primary Success Criteria
api.mdformatValidation Approach
Technical Details
Custom Elements Manifest Schema
CEM generates a standardized JSON schema containing:
{ "schemaVersion": "2.1.0", "readme": "README.md", "modules": [ { "kind": "javascript-module", "path": "src/component.ts", "declarations": [ { "kind": "class", "name": "ComponentName", "tagName": "auro-component", "customElement": true, "members": [...], "attributes": [...], "events": [...], "superclass": {...} } ] } ] }Integration Points
Conclusion
The migration to Custom Elements Manifest addresses both WCA limitations outlined in our problem statement: inheritance documentation gaps and modern package delivery compatibility.
With minimal implementation effort (1 sprint), we've resolved both documentation issues and established a foundation for enhanced developer experience across the web components ecosystem.
The investment in CEM provides immediate value through complete documentation generation and long-term value through ecosystem compatibility and future integration opportunities.
References
Beta Was this translation helpful? Give feedback.
All reactions