This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This project uses pnpm (v10+) and requires Node.js >= 20.
pnpm install # Install dependencies
pnpm build # Compile TypeScript (uses tsdown)
pnpm test # Run Jest tests
pnpm pretty:check # Check Prettier formatting
pnpm pretty:fix # Fix formatting issuesTo run a single test file:
pnpm test src/__tests__/rss2.spec.tsThis library generates RSS 2.0, Atom 1.0, and JSON Feed 1.0 feeds from a common data model.
Core Pattern: The Feed class (src/feed.ts) stores feed configuration and items. Three renderer functions transform this data into different output formats:
src/feed.ts- Main Feed class withrss2(),atom1(),json1()methodssrc/rss2.ts- RSS 2.0 XML renderersrc/atom1.ts- Atom 1.0 XML renderersrc/json.ts- JSON Feed 1.0 renderersrc/typings/index.ts- TypeScript interfaces (Item, Author, Category, Enclosure, FeedOptions)
Dependencies: Uses xml-js for XML generation. Path alias @app/* maps to src/*.
Testing: Jest with snapshot testing. Snapshots in src/__tests__/__snapshots__/ ensure output consistency across formats.