ghost-paper 0.2.0 → 0.3.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 (42) hide show
  1. package/README.md +5 -3
  2. package/dist/cli.js +3 -2
  3. package/package.json +2 -2
  4. package/dist/-5YRZFEDB.js +0 -10
  5. package/dist/-6A745MKY.js +0 -10
  6. package/dist/-ANANGS26.js +0 -10
  7. package/dist/-EON5YM73.js +0 -10
  8. package/dist/-FCFRRCIG.js +0 -10
  9. package/dist/-HRRPL4SN.js +0 -10
  10. package/dist/-K6SQE2E5.js +0 -10
  11. package/dist/-N6RDWVBC.js +0 -10
  12. package/dist/-NRPITI2A.js +0 -10
  13. package/dist/-OKZHAHO3.js +0 -10
  14. package/dist/-RMMSGBXC.js +0 -10
  15. package/dist/-RZB6N6OZ.js +0 -10
  16. package/dist/-TG5MSQYZ.js +0 -10
  17. package/dist/-TTLTI6LQ.js +0 -10
  18. package/dist/-U5MQJGM2.js +0 -10
  19. package/dist/-YCMFHAET.js +0 -10
  20. package/dist/chunk-2QOHE4NF.js +0 -1464
  21. package/dist/chunk-3HX4SVJH.js +0 -1504
  22. package/dist/chunk-4P2YAHD2.js +0 -1522
  23. package/dist/chunk-6WF3MSUR.js +0 -1362
  24. package/dist/chunk-DSRRH4T2.js +0 -1425
  25. package/dist/chunk-J2XA7LOH.js +0 -1463
  26. package/dist/chunk-MNZVZ2ZA.js +0 -1464
  27. package/dist/chunk-NUWIGEJ3.js +0 -1462
  28. package/dist/chunk-QMHJ3BGD.js +0 -1471
  29. package/dist/chunk-RMODJYHI.js +0 -1526
  30. package/dist/chunk-SOKYK7YV.js +0 -1496
  31. package/dist/chunk-TV6ABXBU.js +0 -1534
  32. package/dist/chunk-TW7HQTU6.js +0 -1444
  33. package/dist/chunk-U2G5K2PR.js +0 -1465
  34. package/dist/chunk-UWUILD43.js +0 -1471
  35. package/dist/chunk-ZRSWDAXH.js +0 -1433
  36. package/dist/pdf-ADH6BBSB.js +0 -71
  37. package/dist/pdf-EDRHZK4V.js +0 -72
  38. package/dist/pdf-HC6MMT72.js +0 -62
  39. package/dist/pdf-SKUNOP45.js +0 -62
  40. package/dist/pdf-TQDMPPSC.js +0 -71
  41. package/dist/pdf-VCMDLIDX.js +0 -71
  42. package/dist/pdf-WLYWKSHR.js +0 -71
package/README.md CHANGED
@@ -13,14 +13,16 @@ npm install -g ghost-paper
13
13
  Or run directly:
14
14
 
15
15
  ```bash
16
- npx ghost-paper build report.md
16
+ npx ghost-paper build html report.md
17
17
  ```
18
18
 
19
19
  ## Usage
20
20
 
21
21
  ```bash
22
- ghost-paper build report.md # → report.html
23
- ghost-paper build report.md -o output.html # custom output path
22
+ ghost-paper build html report.md # → report.html
23
+ ghost-paper build html report.md -o output.html # custom output path
24
+ ghost-paper build pdf report.md # → report.pdf
25
+ ghost-paper build pdf report.md --landscape # landscape orientation
24
26
  ```
25
27
 
26
28
  Open the resulting HTML file in any browser. Everything is self-contained — no server needed.
package/dist/cli.js CHANGED
@@ -59,7 +59,8 @@ Write standard markdown tables. Ghost Paper auto-classifies them:
59
59
 
60
60
  Any table that doesn't match these patterns renders as a styled HTML table.`);
61
61
  });
62
- program.command("build").description("Convert a markdown file to an HTML report").argument("<input>", "Markdown file path").option("-o, --output <path>", "Output HTML file path").action((input, opts) => {
62
+ var buildCmd = program.command("build").description("Convert a markdown file to HTML or PDF");
63
+ buildCmd.command("html").description("Convert a markdown file to an HTML report").argument("<input>", "Markdown file path").option("-o, --output <path>", "Output HTML file path").action((input, opts) => {
63
64
  const inputPath = resolve(input);
64
65
  const markdown = readFileSync(inputPath, "utf-8");
65
66
  const outputPath = opts.output ? resolve(opts.output) : inputPath.replace(/\.md$/, ".html");
@@ -67,7 +68,7 @@ program.command("build").description("Convert a markdown file to an HTML report"
67
68
  writeFileSync(outputPath, html, "utf-8");
68
69
  console.log(`\u2728 ${outputPath}`);
69
70
  });
70
- program.command("pdf").description("Convert a markdown file to a PDF report").argument("<input>", "Markdown file path").option("-o, --output <path>", "Output PDF file path").option("--page-size <size>", "Page size: A4 or Letter", "A4").option("--landscape", "Use landscape orientation").action(async (input, opts) => {
71
+ buildCmd.command("pdf").description("Convert a markdown file to a PDF report").argument("<input>", "Markdown file path").option("-o, --output <path>", "Output PDF file path").option("--page-size <size>", "Page size: A4 or Letter", "A4").option("--landscape", "Use landscape orientation").action(async (input, opts) => {
71
72
  const inputPath = resolve(input);
72
73
  const markdown = readFileSync(inputPath, "utf-8");
73
74
  const outputPath = opts.output ? resolve(opts.output) : inputPath.replace(/\.md$/, ".pdf");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ghost-paper",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Turn markdown into beautiful HTML reports",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -28,7 +28,7 @@
28
28
  "ghost-paper": "./dist/cli.js"
29
29
  },
30
30
  "scripts": {
31
- "build": "tsup src/cli.ts --format esm --out-dir dist --external puppeteer-core",
31
+ "build": "tsup src/cli.ts --format esm --out-dir dist --external puppeteer-core --clean",
32
32
  "dev": "tsup src/cli.ts --format esm --out-dir dist --watch --external puppeteer-core"
33
33
  },
34
34
  "dependencies": {
package/dist/-5YRZFEDB.js DELETED
@@ -1,10 +0,0 @@
1
- import {
2
- build,
3
- buildPdf,
4
- buildPrintHtml
5
- } from "./chunk-TW7HQTU6.js";
6
- export {
7
- build,
8
- buildPdf,
9
- buildPrintHtml
10
- };
package/dist/-6A745MKY.js DELETED
@@ -1,10 +0,0 @@
1
- import {
2
- build,
3
- buildPdf,
4
- buildPrintHtml
5
- } from "./chunk-ZRSWDAXH.js";
6
- export {
7
- build,
8
- buildPdf,
9
- buildPrintHtml
10
- };
package/dist/-ANANGS26.js DELETED
@@ -1,10 +0,0 @@
1
- import {
2
- build,
3
- buildPdf,
4
- buildPrintHtml
5
- } from "./chunk-6WF3MSUR.js";
6
- export {
7
- build,
8
- buildPdf,
9
- buildPrintHtml
10
- };
package/dist/-EON5YM73.js DELETED
@@ -1,10 +0,0 @@
1
- import {
2
- build,
3
- buildPdf,
4
- buildPrintHtml
5
- } from "./chunk-DSRRH4T2.js";
6
- export {
7
- build,
8
- buildPdf,
9
- buildPrintHtml
10
- };
package/dist/-FCFRRCIG.js DELETED
@@ -1,10 +0,0 @@
1
- import {
2
- build,
3
- buildPdf,
4
- buildPrintHtml
5
- } from "./chunk-4P2YAHD2.js";
6
- export {
7
- build,
8
- buildPdf,
9
- buildPrintHtml
10
- };
package/dist/-HRRPL4SN.js DELETED
@@ -1,10 +0,0 @@
1
- import {
2
- build,
3
- buildPdf,
4
- buildPrintHtml
5
- } from "./chunk-QMHJ3BGD.js";
6
- export {
7
- build,
8
- buildPdf,
9
- buildPrintHtml
10
- };
package/dist/-K6SQE2E5.js DELETED
@@ -1,10 +0,0 @@
1
- import {
2
- build,
3
- buildPdf,
4
- buildPrintHtml
5
- } from "./chunk-2QOHE4NF.js";
6
- export {
7
- build,
8
- buildPdf,
9
- buildPrintHtml
10
- };
package/dist/-N6RDWVBC.js DELETED
@@ -1,10 +0,0 @@
1
- import {
2
- build,
3
- buildPdf,
4
- buildPrintHtml
5
- } from "./chunk-SOKYK7YV.js";
6
- export {
7
- build,
8
- buildPdf,
9
- buildPrintHtml
10
- };
package/dist/-NRPITI2A.js DELETED
@@ -1,10 +0,0 @@
1
- import {
2
- build,
3
- buildPdf,
4
- buildPrintHtml
5
- } from "./chunk-TV6ABXBU.js";
6
- export {
7
- build,
8
- buildPdf,
9
- buildPrintHtml
10
- };
package/dist/-OKZHAHO3.js DELETED
@@ -1,10 +0,0 @@
1
- import {
2
- build,
3
- buildPdf,
4
- buildPrintHtml
5
- } from "./chunk-3HX4SVJH.js";
6
- export {
7
- build,
8
- buildPdf,
9
- buildPrintHtml
10
- };
package/dist/-RMMSGBXC.js DELETED
@@ -1,10 +0,0 @@
1
- import {
2
- build,
3
- buildPdf,
4
- buildPrintHtml
5
- } from "./chunk-UWUILD43.js";
6
- export {
7
- build,
8
- buildPdf,
9
- buildPrintHtml
10
- };
package/dist/-RZB6N6OZ.js DELETED
@@ -1,10 +0,0 @@
1
- import {
2
- build,
3
- buildPdf,
4
- buildPrintHtml
5
- } from "./chunk-J2XA7LOH.js";
6
- export {
7
- build,
8
- buildPdf,
9
- buildPrintHtml
10
- };
package/dist/-TG5MSQYZ.js DELETED
@@ -1,10 +0,0 @@
1
- import {
2
- build,
3
- buildPdf,
4
- buildPrintHtml
5
- } from "./chunk-MNZVZ2ZA.js";
6
- export {
7
- build,
8
- buildPdf,
9
- buildPrintHtml
10
- };
package/dist/-TTLTI6LQ.js DELETED
@@ -1,10 +0,0 @@
1
- import {
2
- build,
3
- buildPdf,
4
- buildPrintHtml
5
- } from "./chunk-NUWIGEJ3.js";
6
- export {
7
- build,
8
- buildPdf,
9
- buildPrintHtml
10
- };
package/dist/-U5MQJGM2.js DELETED
@@ -1,10 +0,0 @@
1
- import {
2
- build,
3
- buildPdf,
4
- buildPrintHtml
5
- } from "./chunk-RMODJYHI.js";
6
- export {
7
- build,
8
- buildPdf,
9
- buildPrintHtml
10
- };
package/dist/-YCMFHAET.js DELETED
@@ -1,10 +0,0 @@
1
- import {
2
- build,
3
- buildPdf,
4
- buildPrintHtml
5
- } from "./chunk-U2G5K2PR.js";
6
- export {
7
- build,
8
- buildPdf,
9
- buildPrintHtml
10
- };