Skip to content

Commit ee6fc7f

Browse files
authored
Merge pull request #324 from jaredwray/feat-adding-in-Agents.md
feat: adding in Agents.md
2 parents 5005c99 + 55f519f commit ee6fc7f

File tree

10 files changed

+4532
-10
lines changed

10 files changed

+4532
-10
lines changed

.github/workflows/code-coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717

1818
steps:
1919
- uses: actions/checkout@v4
20-
- name: Use Node.js 22
20+
- name: Use Node.js
2121
uses: actions/setup-node@v4
2222
with:
23-
node-version: 22
23+
node-version: 24
2424

2525
- name: Install Dependencies
2626
run: npm install -g pnpm && pnpm install

.github/workflows/deploy-site.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
uses: actions/checkout@v4
1919

2020
# Test
21-
- name: Use Node.js 22
21+
- name: Use Node.js
2222
uses: actions/setup-node@v4
2323
with:
24-
node-version: 22
24+
node-version: 24
2525

2626
- name: Install Dependencies
2727
run: npm install -g pnpm && pnpm install

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
with:
1919
ref: ${{ github.event.release.target_commitish }}
2020

21-
- name: Use Node.js 22
21+
- name: Use Node.js
2222
uses: actions/setup-node@v4
2323
with:
24-
node-version: 22
24+
node-version: 24
2525

2626
- name: Install Dependencies
2727
run: npm install -g pnpm && pnpm install

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
strategy:
1616
matrix:
17-
node-version: [20, 22]
17+
node-version: [20, 22, 24]
1818

1919
steps:
2020
- uses: actions/checkout@v4

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ yarn.lock
110110
package-lock.json
111111
site/README.md
112112
dist-site/
113-
pnpm-lock.yaml
114113

115114
# AI
116115
.claude

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22
1+
24

AGENTS.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Agent Guidelines for Ecto
2+
3+
Ecto is a modern template consolidation engine that provides a unified interface for working with multiple popular template engines (EJS, Markdown, Pug, Nunjucks, Mustache, Handlebars, and Liquid).
4+
5+
## Project Overview
6+
7+
- **Purpose**: Simplify template rendering by providing a single API for multiple template engines with automatic engine selection based on file extensions
8+
- **Architecture**: TypeScript library with a plugin architecture - `Ecto` coordinates engines, `BaseEngine` provides common functionality, individual engine classes handle specific template formats
9+
- **Key Dependencies**: `ejs`, `pug`, `nunjucks`, `liquidjs`, `@jaredwray/fumanchu` (Handlebars/Mustache), `writr` (Markdown), `cacheable` (caching), `hookified` (events/hooks)
10+
11+
## Development Commands
12+
13+
- Use `pnpm` instead of `npm` for all package management commands
14+
- `pnpm build` - Build TypeScript to ESM with type declarations
15+
- `pnpm test` - Run linting and tests with coverage
16+
- `pnpm lint` - Run Biome linter with auto-fix
17+
- `pnpm clean` - Remove dist, coverage, node_modules, and lock files
18+
19+
## Code Quality Requirements
20+
21+
- Always run `pnpm test` to verify tests pass before completing changes
22+
- All new code must have corresponding tests
23+
- Follow existing code patterns in `src/ecto.ts` for the main class
24+
- Use Biome for linting and formatting (configured in the project)
25+
- TypeScript strict mode is enabled
26+
27+
## Project Structure
28+
29+
- `src/ecto.ts` - Main Ecto class (core engine coordinator)
30+
- `src/base-engine.ts` - Base class for all engines
31+
- `src/engine-interface.ts` - TypeScript interface for engine implementations
32+
- `src/engine-map.ts` - Manages file extension to engine mappings
33+
- `src/engines/` - Individual engine implementations (ejs, handlebars, liquid, markdown, nunjucks, pug)
34+
- `test/` - Vitest test files
35+
36+
## Engine Mapping
37+
38+
- `.ejs` → EJS
39+
- `.md`, `.markdown` → Markdown
40+
- `.pug`, `.jade` → Pug
41+
- `.njk` → Nunjucks
42+
- `.mustache` → Mustache
43+
- `.handlebars`, `.hbs`, `.hjs` → Handlebars
44+
- `.liquid` → Liquid
45+
46+
## Key Considerations
47+
48+
- Async and sync rendering methods are available (`render`/`renderSync`, `renderFromFile`/`renderFromFileSync`)
49+
- FrontMatter support is built-in for Markdown files
50+
- Caching is available via the `cacheable` library for performance optimization
51+
- Hooks system allows intercepting and modifying data during rendering
52+
- Custom engines can be created by implementing the `EngineInterface`

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@AGENTS.md

0 commit comments

Comments
 (0)