@dimm-city/print-md 0.1.11 → 0.1.13

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 (3) hide show
  1. package/README.md +15 -53
  2. package/dist/cli.js +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Command-line interface for print-md — markdown to print-ready PDF.
4
4
 
5
- The CLI is for power users who want to script builds, run in CI, batch-process projects, or work outside the desktop app. If you just want to write a book and export a PDF, use the [desktop app](../../README.md#get-the-desktop-app) instead.
5
+ The CLI is for power users who want to script builds, run in CI, batch-process projects, or work outside the desktop app. If you just want to write a book and export a PDF, use the [desktop app](https://github.com/dimm-city/print-md#get-the-desktop-app) instead.
6
6
 
7
7
  ## Install
8
8
 
@@ -26,34 +26,9 @@ Move the binary somewhere on your `PATH`, mark it executable (`chmod +x`), and y
26
26
  npm install -g @dimm-city/print-md
27
27
  ```
28
28
 
29
- This installs the CLI for `node`-based projects. Same surface area as the binary.
30
-
31
- ### With Docker (full PDF/X pipeline pre-installed)
32
-
33
- No need to install Chromium, Ghostscript, or qpdf — the image bundles
34
- everything the `lint → build → validate` pipeline needs, including the PDF/X
35
- (CMYK) pre-print path. (All other validation runs in-process; Poppler and
36
- ImageMagick are no longer used.) Mount your project at `/work`:
37
-
38
- ```sh
39
- docker run --rm -u "$(id -u):$(id -g)" -v "$PWD:/work" \
40
- ghcr.io/dimm-city/print-md build my-book --out dist/my-book.pdf --format pdfx
41
- ```
42
-
43
- See [docs/docker.md](../../docs/docker.md) for the full guide.
44
-
45
- ### From source (development only)
46
-
47
- ```sh
48
- git clone https://github.com/dimm-city/print-md.git
49
- cd print-md
50
- bun install
51
- bun packages/cli/src/cli.ts --help
52
- ```
53
-
54
29
  ## System requirements
55
30
 
56
- The CLI needs a Chromium-based browser for PDF generation, and a few external tools for PDF post-processing and validation depending on which features you use. See [User Guide: Chapter 8 — System Setup](../../examples/print-md-user-guide/08-system-setup.md) for the full per-feature requirements matrix.
31
+ The CLI needs a Chromium-based browser for PDF generation, and a few external tools for PDF post-processing and validation depending on which features you use. See [User Guide: Chapter 8 — System Setup](https://github.com/dimm-city/print-md/blob/main/examples/print-md-user-guide/08-system-setup.md) for the full per-feature requirements matrix.
57
32
 
58
33
  The short version: you almost certainly want **Ghostscript** installed for PDF output, and **Chrome** / **Chromium** / **Edge** for the actual render.
59
34
 
@@ -91,11 +66,11 @@ my-book/
91
66
  └─ images/ ← images referenced from markdown or CSS
92
67
  ```
93
68
 
94
- See [User Guide: Chapter 1 — Getting Started](../../examples/print-md-user-guide/01-getting-started.md) for a full first-project walkthrough and [examples/](../../examples/) for working starters.
69
+ See [User Guide: Chapter 1 — Getting Started](https://github.com/dimm-city/print-md/blob/main/examples/print-md-user-guide/01-getting-started.md) for a full first-project walkthrough and [examples/](https://github.com/dimm-city/print-md/tree/main/examples) for working starters.
95
70
 
96
71
  ## Manifest
97
72
 
98
- `manifest.yaml` is where you control everything that isn't authored in markdown — book title, the page-size preset, custom styles, plugin loading, validation rules, PDF/X configuration. The schema lives in [`docs/schema-autocomplete.md`](../../docs/schema-autocomplete.md) for YAML autocomplete in editors.
73
+ `manifest.yaml` is where you control everything that isn't authored in markdown — book title, the page-size preset, custom styles, plugin loading, validation rules, PDF/X configuration. The schema lives in [`docs/schema-autocomplete.md`](https://github.com/dimm-city/print-md/blob/main/docs/schema-autocomplete.md) for YAML autocomplete in editors.
99
74
 
100
75
  Minimal example:
101
76
 
@@ -116,7 +91,7 @@ source:
116
91
  - chapter-02.md
117
92
  ```
118
93
 
119
- The full configuration cascade is `CLI flags > manifest.yaml > preset defaults`. See [docs/user-guide.md](../../docs/user-guide.md#configuration) for the comprehensive reference.
94
+ The full configuration cascade is `CLI flags > manifest.yaml > preset defaults`. See the [configuration reference](https://github.com/dimm-city/print-md/blob/main/docs/user-guide.md#configuration) for details.
120
95
 
121
96
  ## Commands
122
97
 
@@ -165,7 +140,7 @@ Common print-unsafe patterns the plugin flags: remote `url(...)` references in C
165
140
 
166
141
  ### `print-md validate`
167
142
 
168
- Run the validation pipeline (pre-build source checks and/or post-build PDF checks). Tools that aren't installed are skipped with a warning — they don't fail the run. See [User Guide: Chapter 7 — Validation](../../examples/print-md-user-guide/07-validation.md) for the full check list and [User Guide: Chapter 8 — System Setup](../../examples/print-md-user-guide/08-system-setup.md) for which external tools each check needs.
143
+ Run the validation pipeline (pre-build source checks and/or post-build PDF checks). Tools that aren't installed are skipped with a warning — they don't fail the run. See [User Guide: Chapter 7 — Validation](https://github.com/dimm-city/print-md/blob/main/examples/print-md-user-guide/07-validation.md) for the full check list and [User Guide: Chapter 8 — System Setup](https://github.com/dimm-city/print-md/blob/main/examples/print-md-user-guide/08-system-setup.md) for which external tools each check needs.
169
144
 
170
145
  ```sh
171
146
  print-md validate [input-dir] [options]
@@ -196,7 +171,7 @@ plugins:
196
171
  priority: 10
197
172
  ```
198
173
 
199
- See [User Guide: Chapter 6 — Plugins](../../examples/print-md-user-guide/06-plugins.md) for authoring custom plugins.
174
+ See [User Guide: Chapter 6 — Plugins](https://github.com/dimm-city/print-md/blob/main/examples/print-md-user-guide/06-plugins.md) for authoring custom plugins.
200
175
 
201
176
  ## CI / scripting
202
177
 
@@ -212,35 +187,22 @@ The standalone binary is the easiest way — drop it in a GitHub Actions step an
212
187
  ./print-md build ./my-book --out dist/my-book.pdf
213
188
  ```
214
189
 
215
- The binary is self-contained except for the system tools described in [User Guide: Chapter 8 — System Setup](../../examples/print-md-user-guide/08-system-setup.md). On a runner with Chrome and Ghostscript present, you don't need a separate Node or Bun install.
190
+ The binary is self-contained except for the system tools described in [User Guide: Chapter 8 — System Setup](https://github.com/dimm-city/print-md/blob/main/examples/print-md-user-guide/08-system-setup.md). On a runner with Chrome and Ghostscript present, you don't need a separate Node or Bun install.
216
191
 
217
192
  ## Troubleshooting
218
193
 
219
- - **`spawn gs ENOENT`** — Ghostscript not installed. Plain `--format pdf` keeps working (only loses the `/Creator` metadata stamp). PDF/X builds genuinely need it. See [User Guide: Chapter 8 — System Setup](../../examples/print-md-user-guide/08-system-setup.md).
194
+ - **`spawn gs ENOENT`** — Ghostscript not installed. Plain `--format pdf` keeps working (only loses the `/Creator` metadata stamp). PDF/X builds genuinely need it. See [User Guide: Chapter 8 — System Setup](https://github.com/dimm-city/print-md/blob/main/examples/print-md-user-guide/08-system-setup.md).
220
195
  - **`No Chrome or Chromium binary found`** — install Chrome/Chromium/Edge, or set `CHROMIUM_PATH=/path/to/chrome` in your environment.
221
196
  - **`Tool "X" not found — skipping`** during validate — that's the graceful path; the check requires `X` and isn't available. Install the tool or accept the skip.
222
197
  - **All validate checks skipped on Windows** — was a bug pre-0.1.7 (used `which`, which isn't on stock Windows); fixed to use `where.exe`.
223
198
 
224
- ## Development
225
-
226
- This package is part of the [print-md monorepo](../../README.md). The CLI itself is a thin shell over [`@dimm-city/print-md-lib`](../lib/) — almost all logic lives there.
227
-
228
- ```sh
229
- # From repo root
230
- bun install
231
-
232
- # Run CLI from source
233
- bun packages/cli/src/cli.ts build ./examples/dc-design-guide
234
-
235
- # Build the standalone binary for the current platform
236
- bun --cwd packages/cli scripts/compile.ts bun-linux-x64 ./dist/print-md-cli-linux-x64
237
-
238
- # Build the npm tarball
239
- bun --cwd packages/cli scripts/build-npm.ts
240
- ```
199
+ ## Links
241
200
 
242
- See [`CONTRIBUTING.md`](../../CONTRIBUTING.md) for the contributor workflow and [`docs/ARCHITECTURE.md`](../../docs/ARCHITECTURE.md) for the architectural rules of this package (no bundlers at runtime, lazy-loaded heavy deps, etc).
201
+ - [GitHub repository](https://github.com/dimm-city/print-md)
202
+ - [Report an issue](https://github.com/dimm-city/print-md/issues)
203
+ - [Full user guide](https://github.com/dimm-city/print-md/tree/main/examples/print-md-user-guide)
204
+ - [Desktop app](https://github.com/dimm-city/print-md/releases/latest)
243
205
 
244
206
  ## License
245
207
 
246
- [MPL-2.0](../../LICENSE)
208
+ [MPL-2.0](https://github.com/dimm-city/print-md/blob/main/LICENSE)
package/dist/cli.js CHANGED
@@ -22640,7 +22640,7 @@ var package_default;
22640
22640
  var init_package = __esm(() => {
22641
22641
  package_default = {
22642
22642
  name: "@dimm-city/print-md-lib",
22643
- version: "0.1.11",
22643
+ version: "0.1.13",
22644
22644
  private: true,
22645
22645
  type: "module",
22646
22646
  main: "dist/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dimm-city/print-md",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "Markdown-to-PDF converter for professional print layout using Paged.js and Ghostscript.",
5
5
  "author": "itlackey",
6
6
  "license": "MPL-2.0",