create-asciidoc-multi-book-workspace 0.1.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 (70) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +202 -0
  3. package/README.md +93 -0
  4. package/dist/create.js +41 -0
  5. package/dist/init-workspace.js +58 -0
  6. package/dist/runtime/adoc-books.mjs +395 -0
  7. package/dist/template-manifest.js +11 -0
  8. package/package.json +55 -0
  9. package/templates/default-workspace/README.md +66 -0
  10. package/templates/default-workspace/books/00-book-anatomy/backmatter/appendix-a.adoc +18 -0
  11. package/templates/default-workspace/books/00-book-anatomy/backmatter/bibliography.adoc +4 -0
  12. package/templates/default-workspace/books/00-book-anatomy/backmatter/glossary.adoc +10 -0
  13. package/templates/default-workspace/books/00-book-anatomy/backmatter/index.adoc +9 -0
  14. package/templates/default-workspace/books/00-book-anatomy/book.adoc +54 -0
  15. package/templates/default-workspace/books/00-book-anatomy/frontmatter/abstract.adoc +5 -0
  16. package/templates/default-workspace/books/00-book-anatomy/frontmatter/acknowledgments.adoc +3 -0
  17. package/templates/default-workspace/books/00-book-anatomy/frontmatter/colophon.adoc +5 -0
  18. package/templates/default-workspace/books/00-book-anatomy/frontmatter/dedication.adoc +3 -0
  19. package/templates/default-workspace/books/00-book-anatomy/frontmatter/preface.adoc +5 -0
  20. package/templates/default-workspace/books/00-book-anatomy/parts/01-front-structure/01-frontmatter-map.adoc +24 -0
  21. package/templates/default-workspace/books/00-book-anatomy/parts/01-front-structure/_partintro.adoc +1 -0
  22. package/templates/default-workspace/books/00-book-anatomy/parts/02-body-structure/01-body-map.adoc +13 -0
  23. package/templates/default-workspace/books/00-book-anatomy/parts/02-body-structure/_partintro.adoc +1 -0
  24. package/templates/default-workspace/books/01-starter-book/assets/images/starter-map.svg +30 -0
  25. package/templates/default-workspace/books/01-starter-book/backmatter/appendix-a.adoc +9 -0
  26. package/templates/default-workspace/books/01-starter-book/backmatter/bibliography.adoc +3 -0
  27. package/templates/default-workspace/books/01-starter-book/book.adoc +26 -0
  28. package/templates/default-workspace/books/01-starter-book/chapters/01-opening.adoc +6 -0
  29. package/templates/default-workspace/books/01-starter-book/chapters/02-main-flow.adoc +5 -0
  30. package/templates/default-workspace/books/01-starter-book/frontmatter/preface.adoc +3 -0
  31. package/templates/default-workspace/books/02-multipart-monograph/backmatter/appendix-a.adoc +5 -0
  32. package/templates/default-workspace/books/02-multipart-monograph/backmatter/bibliography.adoc +3 -0
  33. package/templates/default-workspace/books/02-multipart-monograph/book.adoc +37 -0
  34. package/templates/default-workspace/books/02-multipart-monograph/parts/01-domain/01-problem-world.adoc +6 -0
  35. package/templates/default-workspace/books/02-multipart-monograph/parts/01-domain/02-boundary.adoc +5 -0
  36. package/templates/default-workspace/books/02-multipart-monograph/parts/01-domain/_partintro.adoc +2 -0
  37. package/templates/default-workspace/books/02-multipart-monograph/parts/02-specification/01-book-contract.adoc +5 -0
  38. package/templates/default-workspace/books/02-multipart-monograph/parts/02-specification/02-verification.adoc +5 -0
  39. package/templates/default-workspace/books/02-multipart-monograph/parts/02-specification/_partintro.adoc +1 -0
  40. package/templates/default-workspace/books/03-technical-book-workflow/assets/images/technical-flow.svg +30 -0
  41. package/templates/default-workspace/books/03-technical-book-workflow/backmatter/bibliography.adoc +3 -0
  42. package/templates/default-workspace/books/03-technical-book-workflow/book.adoc +25 -0
  43. package/templates/default-workspace/books/03-technical-book-workflow/chapters/01-build-flow.adoc +12 -0
  44. package/templates/default-workspace/books/03-technical-book-workflow/chapters/02-diagrams.adoc +19 -0
  45. package/templates/default-workspace/books/03-technical-book-workflow/chapters/03-code-includes.adoc +8 -0
  46. package/templates/default-workspace/books/03-technical-book-workflow/examples/minimal-tool.mjs +5 -0
  47. package/templates/default-workspace/books/03-technical-book-workflow/frontmatter/preface.adoc +3 -0
  48. package/templates/default-workspace/books/04-reference-manual/backmatter/bibliography.adoc +4 -0
  49. package/templates/default-workspace/books/04-reference-manual/backmatter/glossary.adoc +8 -0
  50. package/templates/default-workspace/books/04-reference-manual/book.adoc +30 -0
  51. package/templates/default-workspace/books/04-reference-manual/chapters/01-decision-table.adoc +27 -0
  52. package/templates/default-workspace/books/04-reference-manual/chapters/02-path-rules.adoc +14 -0
  53. package/templates/default-workspace/books/04-reference-manual/chapters/03-xref-patterns.adoc +20 -0
  54. package/templates/default-workspace/books/04-reference-manual/chapters/04-growth-paths.adoc +8 -0
  55. package/templates/default-workspace/books/04-reference-manual/frontmatter/preface.adoc +3 -0
  56. package/templates/default-workspace/books/05-upper-volume/backmatter/bibliography.adoc +3 -0
  57. package/templates/default-workspace/books/05-upper-volume/book.adoc +23 -0
  58. package/templates/default-workspace/books/05-upper-volume/chapters/01-upper-opening.adoc +4 -0
  59. package/templates/default-workspace/books/05-upper-volume/chapters/02-upper-core-model.adoc +4 -0
  60. package/templates/default-workspace/books/05-upper-volume/frontmatter/preface.adoc +3 -0
  61. package/templates/default-workspace/books/06-lower-volume/backmatter/bibliography.adoc +3 -0
  62. package/templates/default-workspace/books/06-lower-volume/book.adoc +24 -0
  63. package/templates/default-workspace/books/06-lower-volume/chapters/01-lower-opening.adoc +4 -0
  64. package/templates/default-workspace/books/06-lower-volume/chapters/02-cross-volume-practice.adoc +11 -0
  65. package/templates/default-workspace/books/06-lower-volume/frontmatter/preface.adoc +3 -0
  66. package/templates/default-workspace/catalog.adoc +68 -0
  67. package/templates/default-workspace/gitignore.template +8 -0
  68. package/templates/default-workspace/package.json.template +19 -0
  69. package/templates/default-workspace/shared/attributes.adoc +2 -0
  70. package/templates/default-workspace/shared/images/workspace-map.svg +23 -0
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "{{name}}",
3
+ "private": true,
4
+ "type": "module",
5
+ "engines": {
6
+ "node": ">=20.19.0"
7
+ },
8
+ "packageManager": "pnpm@10.33.0",
9
+ "scripts": {
10
+ "build": "node tools/adoc-books.mjs build",
11
+ "check": "node tools/adoc-books.mjs check",
12
+ "clean": "node tools/adoc-books.mjs clean"
13
+ },
14
+ "devDependencies": {
15
+ "@asciidoctor/reducer": "1.1.2",
16
+ "asciidoctor": "2.2.9",
17
+ "asciidoctor-kroki": "0.18.1"
18
+ }
19
+ }
@@ -0,0 +1,2 @@
1
+ :series-name: AsciiDoc 多本书工作区示例
2
+ :source-format: AsciiDoc
@@ -0,0 +1,23 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="720" height="260" viewBox="0 0 720 260" role="img" aria-labelledby="title desc">
2
+ <title id="title">多本书工作区结构</title>
3
+ <desc id="desc">根工作区提供依赖、总目录和构建脚本,多个独立 book 位于 books 目录下。</desc>
4
+ <rect width="720" height="260" fill="#f8fafc"/>
5
+ <rect x="32" y="32" width="656" height="196" rx="6" fill="#ffffff" stroke="#334155" stroke-width="2"/>
6
+ <text x="56" y="68" font-family="sans-serif" font-size="22" fill="#0f172a">workspace</text>
7
+ <rect x="56" y="96" width="150" height="88" rx="4" fill="#dbeafe" stroke="#2563eb"/>
8
+ <text x="82" y="132" font-family="sans-serif" font-size="16" fill="#1e3a8a">catalog.adoc</text>
9
+ <text x="84" y="158" font-family="sans-serif" font-size="13" fill="#1e40af">书目入口</text>
10
+ <rect x="286" y="96" width="150" height="88" rx="4" fill="#dcfce7" stroke="#16a34a"/>
11
+ <text x="318" y="132" font-family="sans-serif" font-size="16" fill="#14532d">books/</text>
12
+ <text x="312" y="158" font-family="sans-serif" font-size="13" fill="#166534">多个 book.adoc</text>
13
+ <rect x="516" y="96" width="150" height="88" rx="4" fill="#fef3c7" stroke="#d97706"/>
14
+ <text x="546" y="132" font-family="sans-serif" font-size="16" fill="#78350f">shared/</text>
15
+ <text x="544" y="158" font-family="sans-serif" font-size="13" fill="#92400e">共享属性与图片</text>
16
+ <path d="M206 140 H286" stroke="#64748b" stroke-width="2" marker-end="url(#arrow)"/>
17
+ <path d="M436 140 H516" stroke="#64748b" stroke-width="2" marker-end="url(#arrow)"/>
18
+ <defs>
19
+ <marker id="arrow" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto">
20
+ <path d="M0,0 L8,4 L0,8 Z" fill="#64748b"/>
21
+ </marker>
22
+ </defs>
23
+ </svg>