This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
ember-cli-addon-docs is an Ember addon that generates documentation sites for other Ember addons. It provides components for building doc sites, a build pipeline that extracts API docs and search indexes, and a deploy pipeline for GitHub Pages.
- Install:
pnpm install - Dev server:
pnpm start(serves dummy app at http://localhost:4200) - Build:
pnpm build - Lint all:
pnpm lint - Lint fix:
pnpm lint:fix - Run all tests:
pnpm test - Ember tests only:
pnpm test:ember - Ember tests in watch mode:
pnpm test:ember --server - Node tests only:
pnpm test:node(mocha, runs tests intests-node/) - Test app tests:
pnpm test:test-apps(runs tests intest-apps/new-addon)
Uses pnpm as the package manager. The workspace includes test-apps/*.
The core build logic lives in index.js and lib/. During Ember's build process:
-
index.js— Main addon entry point. Hooks into Ember CLI'streeForApp,treeForAddon,treeForPublic, andtreeForVendor. Compiles markdown templates, extracts API docs via plugin registry, and builds a search index. -
lib/broccoli/— Broccoli plugins for the build pipeline:docs-compiler.js— Compiles extracted API documentation into JSON API formatsearch-indexer.js— Builds a lunr.js search index from docs and template contentdocs-filter.js/hbs-content-filter.js— Broccoli filters for processing files
-
lib/preprocessors/— Template preprocessors:markdown-template-compiler.js— Compiles.mdfiles into Handlebars templateshbs-content-extractor.js— Extracts content from HBS templates for search indexing
-
lib/deploy/— ember-cli-deploy plugin for deploying docs to GitHub Pages -
lib/models/plugin-registry.js— Registry for doc generation plugins (e.g.,ember-cli-addon-docs-yuidoc)
Ember Octane components and services that consuming addons use in their doc sites:
- Components:
docs-viewer,docs-header,docs-hero,docs-demo,docs-snippet,docs-code-highlight,api/(API doc viewer components), etc. - Services:
docs-routes(navigation),docs-search(lunr-based search),project-version(version management) - Styles: Uses Tailwind CSS 1.x compiled via PostCSS/Sass pipeline
Standard Ember addon pattern — re-exports addon modules into the consuming app's namespace.
ember-cli-addon-docs— Default blueprint run onember installdocs-page— Generator for new documentation pages
A "sandbox" addon used as a secondary documented project in the dummy app, demonstrating multi-project documentation support.
tests/— Ember tests (acceptance, integration, unit) using QUnit, run via testem in Chrometests-node/— Node.js unit tests using Mocha/Chai for the build pipeline code inlib/test-apps/new-addon— Separate test app in the pnpm workspace
- Plugin system: API doc extraction is pluggable via addons with keyword
ember-cli-addon-docs-plugin. The default plugin isember-cli-addon-docs-yuidoc. documentingAddonAt: Config option allowing a standalone app (not a dummy app) to document an addon at a specific path.- Version support: The addon manages doc versions for deployment, with a "latest" version concept (
-latest).