This directory contains the TypeDoc-generated API documentation for the Plot Twist Creator.
The Twist Creator documentation is automatically published to GitHub Pages whenever changes are pushed to the main branch:
Live Documentation: https://plotday.github.io/plot/
The documentation is automatically updated whenever changes to the Twist Creator are merged into the main branch, ensuring developers always have access to the latest API reference.
The documentation is automatically generated during the build process, but you can also generate it manually.
# From the Twist Creator directory
pnpm build:docsThis will create the documentation in dist/docs/
# Remove the generated docs
pnpm clean:docsAfter generating the documentation, you can view it by opening the generated HTML files in your browser:
# Cross-platform way (recommended)
pnpm docs:openThis script automatically uses the correct command for your platform:
openon macOSxdg-openon Linuxstarton Windows
You can also open it manually:
# macOS
open dist/docs/index.html
# Linux
xdg-open dist/docs/index.html
# Windows
start dist/docs/index.htmlThe generated documentation includes:
- Classes - Twist, Tool, and built-in tool classes
- Interfaces - Activity, Priority, Contact, and other data types
- Enums - ActivityType, ActorType, ActivityLinkType, etc.
- Type Aliases - NewActivity, NewPriority, and utility types
- Modules - Organized by functionality (tools, common, utils)
The documentation is automatically published in two ways:
When changes to the Twist Creator are pushed to the main branch, a GitHub Action automatically:
- Builds the Twist Creator and generates the documentation
- Deploys it to GitHub Pages at https://plotday.github.io/plot/
Workflow Location: .github/workflows/deploy-docs.yml
Trigger: Automatic on push to main when files in public/twist/** change
The documentation is included when the package is built and published to npm. Users can access it by:
- Viewing online at GitHub Pages (see above)
- Exploring the
dist/docs/directory in the published npm package - Using TypeScript language server features in their IDE for inline documentation
If you need to enable or configure GitHub Pages for this repository:
- Go to Repository Settings → Pages
- Under "Source", select: GitHub Actions
- The workflow will automatically handle deployment
The deploy-docs.yml workflow includes all necessary permissions and configurations for GitHub Pages deployment.
The documentation generation is configured in typedoc.json. Key settings:
- Entry Points: Main Twist Creator exports (twist, tool, plot, tools/*)
- Output:
dist/docs/ - Visibility: Public APIs only (excludes private/protected/internal members)
- Theme: Default TypeDoc theme optimized for GitHub Pages
- Source Links: Links to source code on GitHub
To modify the documentation output:
- Edit
typedoc.jsonto change TypeDoc settings - Adjust which files are documented by modifying the
entryPointsarray - Customize the theme, navigation, or sorting options
See the TypeDoc documentation for more configuration options.
When adding new public APIs:
- Add comprehensive JSDoc comments to your code
- Use
@paramtags for function parameters - Use
@returnstag for return values - Use
@exampletags to show usage examples - Use
@seetags to link to related APIs - Regenerate docs with
pnpm build:docsto verify formatting
/**
* Creates a new activity in the current priority.
*
* Activities are the core data type in Plot, representing tasks, events, and notes.
* This method creates a new activity with the specified properties.
*
* @param activity - The activity data to create
* @returns Promise resolving to the created activity with its generated ID
*
* @example
* ```typescript
* const activity = await this.tools.plot.createActivity({
* type: ActivityType.Action,
* title: "Review pull request",
* links: [{
* type: ActivityLinkType.external,
* title: "View PR",
* url: "https://github.com/org/repo/pull/123"
* }]
* });
* ```
*
* @see {@link Activity} for the full activity type definition
* @see {@link ActivityType} for available activity types
*/
abstract createActivity(activity: NewActivity): Promise<Activity>;For issues or questions about the documentation:
- Open an issue at https://github.com/plotday/plot/issues
- Tag it with the
documentationlabel