@thegetty/quire-cli 1.0.0-pre-release.6 → 1.0.0-pre-release.7
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/package.json +1 -1
- package/src/helpers/which.js +17 -0
- package/src/lib/pdf/paged.js +21 -0
- package/src/lib/pdf/prince.js +7 -0
- package/src/lib/telemetry/README.md +0 -0
package/package.json
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import which from 'which'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A simple wrapper around the `which` utility
|
|
5
|
+
* to find the first instance of an executable in the shell environment PATH
|
|
6
|
+
*
|
|
7
|
+
* @param {String} executable shell executable to find
|
|
8
|
+
*/
|
|
9
|
+
export default (executable) => {
|
|
10
|
+
const result = which.sync(executable, { nothrow: true })
|
|
11
|
+
if (!result) {
|
|
12
|
+
console.error(`Unable to locate executable '${executable}'\n
|
|
13
|
+
Ensure that the '${executable}' executable is installed and available in the shell environment PATH.
|
|
14
|
+
`)
|
|
15
|
+
}
|
|
16
|
+
return result
|
|
17
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// if (!commandExists('pagedjs-cli')) return
|
|
2
|
+
// const opts = [
|
|
3
|
+
// `--outline-tags 'h1'`,
|
|
4
|
+
// `--output ${output}`,
|
|
5
|
+
// ]
|
|
6
|
+
// const { stderror, stdout } = execa('pagedjs-cli', [...opts, input])
|
|
7
|
+
|
|
8
|
+
// console.info(`[CLI:lib/pdf] generating PDF using ${lib}`)
|
|
9
|
+
// const Printer = await import('pagedjs-cli')
|
|
10
|
+
/**
|
|
11
|
+
* Configure the Paged.js Printer options
|
|
12
|
+
* @see https://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/blob/main/src/cli.js
|
|
13
|
+
*/
|
|
14
|
+
// const printerOptions = { debug: options.debug || false }
|
|
15
|
+
// const printer = new Printer(printerOptions)
|
|
16
|
+
/**
|
|
17
|
+
* Configure the Paged.js PDF options
|
|
18
|
+
* @see
|
|
19
|
+
*/
|
|
20
|
+
// const pdfOptions = {}
|
|
21
|
+
// const pdfFile = await printer.pdf(input, pdfOptions)
|
|
File without changes
|