Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Build & Test Commands

This project uses pnpm (v10+) and requires Node.js >= 20.

```bash
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 issues
```

To run a single test file:
```bash
pnpm test src/__tests__/rss2.spec.ts
```

## Architecture

This 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 with `rss2()`, `atom1()`, `json1()` methods
- `src/rss2.ts` - RSS 2.0 XML renderer
- `src/atom1.ts` - Atom 1.0 XML renderer
- `src/json.ts` - JSON Feed 1.0 renderer
- `src/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.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "feed",
"version": "5.2.0",
"version": "5.2.1",
"type": "module",
"description": "Feed is a RSS, Atom and JSON feed generator for Node.js, making content syndication simple and intuitive!",
"homepage": "https://github.com/jpmonette/feed",
Expand Down
Loading