@hirokisakabe/pom-cli 0.6.2 → 0.6.4

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 +25 -2
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,9 +1,28 @@
1
- # @hirokisakabe/pom-cli
1
+ <h1 align="center">pom-cli</h1>
2
+ <p align="center">
3
+ CLI tool for <a href="https://www.npmjs.com/package/@hirokisakabe/pom">pom</a> — preview, build, and render presentations from pom XML / Markdown.
4
+ </p>
2
5
 
3
- CLI tool for [pom](https://github.com/hirokisakabe/pom) — preview, build, and render presentations from pom XML / Markdown.
6
+ <p align="center">
7
+ <a href="https://www.npmjs.com/package/@hirokisakabe/pom-cli"><img src="https://img.shields.io/npm/v/@hirokisakabe/pom-cli.svg" alt="npm version"></a>
8
+ <a href="https://github.com/hirokisakabe/pom/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@hirokisakabe/pom-cli.svg" alt="License"></a>
9
+ </p>
10
+
11
+ ---
12
+
13
+ ## Features
14
+
15
+ - **Live Preview Server** — `pom preview` opens a browser, watches the source file, and rebuilds + reloads on every save (handles editor atomic writes like Vim).
16
+ - **PPTX Build** — `pom build` converts `.pom.xml` / `.pom.md` to a `.pptx` file, with optional `--watch` mode for incremental rebuilds.
17
+ - **PNG / SVG Render** — `pom render` rasterizes each slide to PNG (default) or SVG without LibreOffice, useful for slide-image previews in docs.
18
+ - **Diagnostic Surfacing** — Layout, image, master, and auto-fit diagnostics from `buildPptx` fail the run on stderr with a non-zero exit (`pom build` / `pom render`), while `pom preview` keeps updating so issues can be fixed interactively.
19
+ - **Bundled Fonts** — Carlito and Noto Sans CJK JP are bundled for SVG / PNG rendering, so output looks the same on machines without those fonts installed.
20
+ - **Configurable Output** — Choose port, target slides, output format, text rendering mode (`path` outlines vs native `<text>`), and verbose per-step timing.
4
21
 
5
22
  ## Installation
6
23
 
24
+ > Requires Node.js 18+
25
+
7
26
  ```bash
8
27
  npm install -g @hirokisakabe/pom-cli
9
28
  ```
@@ -118,6 +137,10 @@ To print per-step timing on stderr:
118
137
  pom render slides.pom.xml -o ./images --verbose
119
138
  ```
120
139
 
140
+ ## Diagnostics
141
+
142
+ `pom build` and `pom render` invoke `buildPptx` with `strict: true`, so any diagnostic collected during the build — layout problems (`NODE_OUT_OF_BOUNDS`, `NODE_OVERLAP`, `ARROW_REF_NOT_FOUND`, `PER_SIDE_BORDER_WITH_RADIUS`), image / master issues (`IMAGE_MEASURE_FAILED`, `IMAGE_NOT_PREFETCHED`, `MASTER_PPTX_PARSE_FAILED`), or `AUTOFIT_OVERFLOW` — fails the run with a non-zero exit code and prints the diagnostic codes / messages to stderr. Fix the offending XML or input and re-run to proceed. The `pom preview` server continues to update even when diagnostics are emitted, so you can iterate on the file interactively.
143
+
121
144
  ## Fonts
122
145
 
123
146
  This package bundles Carlito and Noto Sans CJK JP fonts for image rendering. These fonts are used when converting slides to SVG in the preview server and to PNG / SVG in `pom render`. System fonts are not scanned.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hirokisakabe/pom-cli",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
4
4
  "description": "CLI tool for pom — preview, build, and render presentations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -30,7 +30,7 @@
30
30
  "node": ">=18"
31
31
  },
32
32
  "dependencies": {
33
- "@hirokisakabe/pom": "^8.5.1",
33
+ "@hirokisakabe/pom": "^8.7.0",
34
34
  "@hirokisakabe/pom-md": "^3.0.0",
35
35
  "commander": "^15.0.0",
36
36
  "pptx-glimpse": "^1.1.1"