@jti/adoc2typst2pdf 1.0.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.
- package/CHANGELOG.adoc +21 -0
- package/README.adoc +2 -0
- package/adoc2typst2pdf.js +761 -0
- package/assembler-typst.dist.yml +27 -0
- package/docbook2typst.js +1195 -0
- package/install.js +27 -0
- package/package.json +33 -0
package/install.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// Installs an Antora Assembler configuration file for producing PDFs with Typst.
|
|
4
|
+
|
|
5
|
+
'use strict'
|
|
6
|
+
|
|
7
|
+
const fs = require('fs')
|
|
8
|
+
const path = require('path')
|
|
9
|
+
|
|
10
|
+
const cwd = process.env.INIT_CWD
|
|
11
|
+
? process.env.INIT_CWD
|
|
12
|
+
: process.cwd()
|
|
13
|
+
|
|
14
|
+
const confFile = 'assembler-typst.yml'
|
|
15
|
+
const confFileDist = 'assembler-typst.dist.yml'
|
|
16
|
+
|
|
17
|
+
console.log(`Installing adoc2typst2pdf...`)
|
|
18
|
+
// Prepare to copy the Antora Assembler config file to the importing project.
|
|
19
|
+
let target = path.join(cwd, confFile)
|
|
20
|
+
|
|
21
|
+
// Only copy to the non-dist version when it does not exist.
|
|
22
|
+
if (!fs.existsSync(target)) {
|
|
23
|
+
fs.copyFileSync(confFileDist, target)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Always update the dist copy, to make comparing config updates easy.
|
|
27
|
+
fs.copyFileSync(confFileDist, path.join(cwd, confFileDist))
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jti/adoc2typst2pdf",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"author": "Ewan Edwards <eedwards@journaltech.com>",
|
|
5
|
+
"license": "ISC",
|
|
6
|
+
"description": "Tools and Antora Assembler configuration for converting Antora documentation projects to PDFs using Typst.",
|
|
7
|
+
"main": "install.js",
|
|
8
|
+
"bin": {
|
|
9
|
+
"adoc2typst2pdf": "./adoc2typst2pdf,js",
|
|
10
|
+
"docbook2typst": "./docbook2typst,js"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
14
|
+
"postinstall": "node install.js"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/jtidocs/adoc2typst2pdf.git"
|
|
19
|
+
},
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/jtidocs/adoc2typst2pdf/issues"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://github.com/jtidocs/adoc2typst2pdf#readme",
|
|
24
|
+
"keywords": [
|
|
25
|
+
"antora",
|
|
26
|
+
"asciidoc",
|
|
27
|
+
"convert",
|
|
28
|
+
"docbook",
|
|
29
|
+
"pdf",
|
|
30
|
+
"transform",
|
|
31
|
+
"typst"
|
|
32
|
+
]
|
|
33
|
+
}
|