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
14 changes: 0 additions & 14 deletions .circleci/config.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Node.js CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm test
27 changes: 27 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# html2thermal Project Guidelines

## Commands
- Run all tests: `npm test`
- Run specific test: `npx mocha -g "test pattern"`

## Code Style
- **Modules**: CommonJS (`require`/`module.exports`)
- **Variables**: Prefer `const`, use `let` when needed
- **Functions**: Use arrow functions for simple cases
- **Naming**: camelCase for variables/functions/files
- **Indentation**: 2 spaces
- **Strings**: Single quotes
- **File Organization**:
- Tag handlers in `src/convert/[tagName]TagHandler.js`
- Utility functions in `src/utils/`

## Patterns
- Functional approach with minimal state
- Handler pattern for different HTML tags
- Central processing in `src/convert/index.js`
- Return `null` for special conditions instead of throwing errors
- Tests use Mocha with describe/it blocks and assert.deepStrictEqual

## Dependencies
- Core: cheerio, sanitize-html, jimp, lodash, node-thermal-printer
- Test: mocha, probe-image-size
Loading