@voidberg/quarto 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +8 -6
  2. package/package.json +3 -1
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![npm](https://img.shields.io/npm/v/@voidberg/quarto.svg)](https://www.npmjs.com/package/@voidberg/quarto)
6
6
  [![JSR](https://jsr.io/badges/@voidberg/quarto)](https://jsr.io/@voidberg/quarto)
7
7
  [![CI](https://github.com/voidberg/quarto/actions/workflows/ci.yml/badge.svg)](https://github.com/voidberg/quarto/actions/workflows/ci.yml)
8
- [![MIT License](https://img.shields.io/npm/l/@voidberg/quarto.svg)](https://opensource.org/licenses/MIT)
8
+ [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
9
9
 
10
10
  > a book size of about 9½ × 12 inches (24 × 30 centimetres), determined by folding printed sheets twice to form four leaves or eight pages.
11
11
 
@@ -39,7 +39,7 @@ Quarto came out of specific needs in my own projects (like [instakobo](https://g
39
39
  - Optional table of contents (`includeToc`)
40
40
  - Native kepub conversion (`toKepub`) — Kobo reading-location spans, no binary needed
41
41
  - In-memory: returns a `Uint8Array`, never touches the filesystem
42
- - Runtime-agnostic: Node, Deno, Bun, and the browser (Web APIs + [`fflate`](https://github.com/101arrowz/fflate))
42
+ - Runtime-agnostic: Node, Deno, Bun, Cloudflare Workers, and the browser (Web APIs + [`fflate`](https://github.com/101arrowz/fflate))
43
43
  - Re-serializes messy HTML into well-formed XHTML for you
44
44
  - Downloads and embeds remote images so the book is self-contained
45
45
  - Modern **ESM-only** (Node ≥ 18; `require()`-able from CommonJS on Node ≥ 20.19 / 22)
@@ -137,13 +137,15 @@ const epub = await generateEpub({
137
137
 
138
138
  ```sh
139
139
  npm install
140
- npm test # vitest
141
- npm run build # tsc → dist (ESM + d.ts)
140
+ git config core.hooksPath .githooks # one-time: enable the pre-push test gate
141
+ npm test # vitest
142
+ npm run test:workers # vitest in the Cloudflare Workers runtime (workerd)
143
+ npm run build # tsc → dist (ESM + d.ts)
142
144
  npm run typecheck
143
- npm run validate # EPUBCheck (needs Java + EPUBCHECK_JAR)
145
+ npm run validate # EPUBCheck (needs Java + EPUBCHECK_JAR)
144
146
  ```
145
147
 
146
- EPUBCheck runs in CI against generated fixtures to guarantee spec compliance.
148
+ The `pre-push` hook (in `.githooks/`) runs typecheck, lint, and tests before a push; the slower Workers and EPUBCheck suites run in CI. EPUBCheck runs in CI against generated fixtures to guarantee spec compliance.
147
149
 
148
150
  ## Thanks to
149
151
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voidberg/quarto",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Generate EPUB3 and Kobo kepub files from HTML — runtime-agnostic, in-memory, with optional table of contents.",
5
5
  "keywords": [
6
6
  "epub",
@@ -41,6 +41,7 @@
41
41
  "build": "npm run clean && tsc -p tsconfig.build.json",
42
42
  "test": "vitest run",
43
43
  "test:watch": "vitest",
44
+ "test:workers": "vitest run --config vitest.workers.config.ts",
44
45
  "typecheck": "tsc --noEmit",
45
46
  "validate": "node scripts/validate-epubcheck.mjs",
46
47
  "lint": "biome check .",
@@ -54,6 +55,7 @@
54
55
  },
55
56
  "devDependencies": {
56
57
  "@biomejs/biome": "^2.5.1",
58
+ "@cloudflare/vitest-pool-workers": "^0.16.20",
57
59
  "@types/node": "^24.13.2",
58
60
  "typescript": "^5.9.3",
59
61
  "vitest": "^4.1.9"