From c99e54534742e47cf81412e85f6b7358054bc159 Mon Sep 17 00:00:00 2001 From: "D. Moonfire" Date: Sun, 17 Apr 2022 23:47:49 -0500 Subject: [PATCH] build: getting EPUB and PDF generation --- package-lock.json | 68 +++++++++++++++-------------------------------- package.json | 12 ++++----- publication.json | 50 ++++++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+), 52 deletions(-) create mode 100644 publication.json diff --git a/package-lock.json b/package-lock.json index 904e9c1..fc18257 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,13 +8,13 @@ "name": "exit-planning", "version": "0.1.0", "dependencies": { - "@mfgames-writing/contracts": "^4.1.0", + "@mfgames-writing/clean-theme": "^4.0.2", + "@mfgames-writing/contracts": "^4.2.0", "@mfgames-writing/epub2-format": "^2.1.1", - "@mfgames-writing/format": "^3.1.1", - "@mfgames-writing/greekil-theme": "^2.0.2", + "@mfgames-writing/format": "^3.2.0", "@mfgames-writing/guillemet": "^1.0.0", "@mfgames-writing/hyphen-pipeline": "^1.0.2", - "@mfgames-writing/weasyprint-format": "^5.0.3" + "@mfgames-writing/weasyprint-format": "^5.0.4" }, "devDependencies": { "@commitlint/cli": "^15.0.0", @@ -775,6 +775,15 @@ "core-js": "^2.5.7" } }, + "node_modules/@mfgames-writing/clean-theme": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@mfgames-writing/clean-theme/-/clean-theme-4.0.2.tgz", + "integrity": "sha512-57Dyn7m2Zd8NGNbFUn368+5gi4U4OYKGcTS0GdzWeLkTns/IOU5+RAIiraoMPsrFJRTiqLpW3VMmfC16WFwHZA==", + "dependencies": { + "@mfgames-writing/contracts": "^4.0.0", + "@mfgames-writing/liquid-theme": "^2.0.0" + } + }, "node_modules/@mfgames-writing/contracts": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/@mfgames-writing/contracts/-/contracts-4.2.0.tgz", @@ -1073,17 +1082,6 @@ "node": ">=0.10.0" } }, - "node_modules/@mfgames-writing/greekil-theme": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@mfgames-writing/greekil-theme/-/greekil-theme-2.0.2.tgz", - "integrity": "sha512-eFr7jYDNhYFQaB3axS1huygP2za1lM/V0JXGfmE0cgvHKi+JmVpaAlvoMTD3DSA/ZVuiVk616DO349VANZ/gcA==", - "dependencies": { - "@mfgames-writing/contracts": "^4.0.0", - "@mfgames-writing/liquid-theme": "^2.0.0", - "@typopro/dtp-gentium": "^3.7.5", - "@typopro/web-gentium": "^3.7.5" - } - }, "node_modules/@mfgames-writing/guillemet": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@mfgames-writing/guillemet/-/guillemet-1.0.0.tgz", @@ -1780,16 +1778,6 @@ "integrity": "sha512-xoDlM2S4ortawSWORYqsdU+2rxdh4LRW9ytc3zmT37RIKQh6IHyKwwtKhKis9ah8ol07DCkZxPt8BBvPjC6v4g==", "dev": true }, - "node_modules/@typopro/dtp-gentium": { - "version": "3.7.5", - "resolved": "https://registry.npmjs.org/@typopro/dtp-gentium/-/dtp-gentium-3.7.5.tgz", - "integrity": "sha512-o5TbzvZvUP764lT7M5DIoMRrzSmGS5EO+jYbfasxICHLt/PYdb7KQdCFNLywfVQrmmX7B0Q5j4VSN9BKvRkkZQ==" - }, - "node_modules/@typopro/web-gentium": { - "version": "3.7.5", - "resolved": "https://registry.npmjs.org/@typopro/web-gentium/-/web-gentium-3.7.5.tgz", - "integrity": "sha512-V2ffRAhpbhNeezafV8HxK5SyqVqVObNn1SGljUmFPeZSTuktKuVZD8cck2Ggod/cloJGd5VFpzja5onKrlvzgA==" - }, "node_modules/add-commas": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/add-commas/-/add-commas-0.0.4.tgz", @@ -11183,6 +11171,15 @@ "core-js": "^2.5.7" } }, + "@mfgames-writing/clean-theme": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@mfgames-writing/clean-theme/-/clean-theme-4.0.2.tgz", + "integrity": "sha512-57Dyn7m2Zd8NGNbFUn368+5gi4U4OYKGcTS0GdzWeLkTns/IOU5+RAIiraoMPsrFJRTiqLpW3VMmfC16WFwHZA==", + "requires": { + "@mfgames-writing/contracts": "^4.0.0", + "@mfgames-writing/liquid-theme": "^2.0.0" + } + }, "@mfgames-writing/contracts": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/@mfgames-writing/contracts/-/contracts-4.2.0.tgz", @@ -11434,17 +11431,6 @@ } } }, - "@mfgames-writing/greekil-theme": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@mfgames-writing/greekil-theme/-/greekil-theme-2.0.2.tgz", - "integrity": "sha512-eFr7jYDNhYFQaB3axS1huygP2za1lM/V0JXGfmE0cgvHKi+JmVpaAlvoMTD3DSA/ZVuiVk616DO349VANZ/gcA==", - "requires": { - "@mfgames-writing/contracts": "^4.0.0", - "@mfgames-writing/liquid-theme": "^2.0.0", - "@typopro/dtp-gentium": "^3.7.5", - "@typopro/web-gentium": "^3.7.5" - } - }, "@mfgames-writing/guillemet": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@mfgames-writing/guillemet/-/guillemet-1.0.0.tgz", @@ -12030,16 +12016,6 @@ "integrity": "sha512-xoDlM2S4ortawSWORYqsdU+2rxdh4LRW9ytc3zmT37RIKQh6IHyKwwtKhKis9ah8ol07DCkZxPt8BBvPjC6v4g==", "dev": true }, - "@typopro/dtp-gentium": { - "version": "3.7.5", - "resolved": "https://registry.npmjs.org/@typopro/dtp-gentium/-/dtp-gentium-3.7.5.tgz", - "integrity": "sha512-o5TbzvZvUP764lT7M5DIoMRrzSmGS5EO+jYbfasxICHLt/PYdb7KQdCFNLywfVQrmmX7B0Q5j4VSN9BKvRkkZQ==" - }, - "@typopro/web-gentium": { - "version": "3.7.5", - "resolved": "https://registry.npmjs.org/@typopro/web-gentium/-/web-gentium-3.7.5.tgz", - "integrity": "sha512-V2ffRAhpbhNeezafV8HxK5SyqVqVObNn1SGljUmFPeZSTuktKuVZD8cck2Ggod/cloJGd5VFpzja5onKrlvzgA==" - }, "add-commas": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/add-commas/-/add-commas-0.0.4.tgz", diff --git a/package.json b/package.json index 8242d69..c234725 100644 --- a/package.json +++ b/package.json @@ -6,22 +6,22 @@ "scripts": { "build:pdf": "mfgames-writing-format build pdf", "build:epub": "mfgames-writing-format build epub", - "build": "npm run build:epub && npm run build:pdf", + "build": "run-s build:*", "prebuild": "npm run format", - "test:epubcheck": "epubcheck *.epub", "prepare": "husky install", "format": "prettier . --write --loglevel warn", "test": "run-s test:*", + "test:epubcheck": "epubcheck *.epub", "test:commits": "commitlint-gitlab-ci -x @commitlint/config-conventional" }, "dependencies": { - "@mfgames-writing/contracts": "^4.1.0", + "@mfgames-writing/clean-theme": "^4.0.2", + "@mfgames-writing/contracts": "^4.2.0", "@mfgames-writing/epub2-format": "^2.1.1", - "@mfgames-writing/format": "^3.1.1", - "@mfgames-writing/greekil-theme": "^2.0.2", + "@mfgames-writing/format": "^3.2.0", "@mfgames-writing/guillemet": "^1.0.0", "@mfgames-writing/hyphen-pipeline": "^1.0.2", - "@mfgames-writing/weasyprint-format": "^5.0.3" + "@mfgames-writing/weasyprint-format": "^5.0.4" }, "devDependencies": { "@commitlint/cli": "^15.0.0", diff --git a/publication.json b/publication.json new file mode 100644 index 0000000..876a1fb --- /dev/null +++ b/publication.json @@ -0,0 +1,50 @@ +{ + "metadata": { + "author": "D. Moonfire", + "title": "Exit Planning", + "language": "en", + "theme": "@mfgames-writing/clean-theme", + "outputDirectory": ".", + "outputFilename": "{{ edition.name }}-{{ edition.version }}.{{ edition.ext }}" + }, + "editions": { + "epub": { + "format": "@mfgames-writing/epub2-format", + "ext": "epub" + }, + "pdf": { + "format": "@mfgames-writing/weasyprint-format", + "images": { + "grayscale": true, + "opaque": true + }, + "ext": "pdf" + } + }, + "_common": { + "pipeline": [ + { + "module": "@mfgames-writing/hyphen-pipeline" + } + ] + }, + "contents": [ + { + "element": "toc", + "linear": false, + "title": "Contents", + "exclude": { + "editions": ["pdf"] + } + }, + { + "element": "chapter", + "source": "src/introduction.md", + "pipeline": [ + { + "module": "@mfgames-writing/hyphen-pipeline" + } + ] + } + ] +}