@farberg/reveal-template 1.0.64 → 1.0.66

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farberg/reveal-template",
3
- "version": "1.0.64",
3
+ "version": "1.0.66",
4
4
  "homepage": "https://github.com/pfisterer/reveal-template",
5
5
  "description": "Reveal.js template for Dennis' lectures",
6
6
  "main": "index.js",
@@ -17,7 +17,7 @@ function showToc(url, el) {
17
17
  fetch(url, { "cache": "no-store" })
18
18
  .then(res => res.text())
19
19
  .then(html => el.innerHTML = html)
20
- .catch(el.innerText = `Unable to load TOC from ${url}`)
20
+ .catch(e => console.log(`Unable to load TOC from ${url}`, e))
21
21
  }
22
22
 
23
23
  export default () => {
@@ -144,6 +144,7 @@ async function convert_to_pdf_single(todo) {
144
144
 
145
145
 
146
146
  async function merge_pdfs(todos, out_file) {
147
+ const out_file_path = path.join(pdf_dir, path.basename(out_file))
147
148
  const merger = new PDFMerger()
148
149
 
149
150
  let pdfs = todos
@@ -156,8 +157,9 @@ async function merge_pdfs(todos, out_file) {
156
157
  await merger.add(pdf)
157
158
  }
158
159
  if (verbose)
159
- console.log(`Saving merged file to ${out_file}`)
160
- await merger.save(out_file);
160
+ console.log(`Saving merged file to ${out_file_path}`)
161
+
162
+ await merger.save(out_file_path);
161
163
  }
162
164
 
163
165
 
@@ -20,6 +20,8 @@ let md_files = fs.readdirSync(".")
20
20
 
21
21
  let generateTable = md_files.map(file => file.match(structuredNameRegexp)).reduce((a, b) => a && b, true)
22
22
 
23
+ console.error(`Generating ${generateTable ? 'table' : 'list'} of contents for ${md_files.length} files.`)
24
+
23
25
  if (generateTable)
24
26
  console.log("<table class='toc_table'>")
25
27
  else
@@ -70,6 +72,7 @@ if (generateTable) {
70
72
  }
71
73
 
72
74
  let exists = fs.existsSync(path.join(pdf_folder, combined_pdf_name))
75
+ console.error(`Combined PDF ${exists ? "does" : "does not"} exist. Looking for '${combined_pdf_name}'`)
73
76
  if (exists) {
74
77
  console.log(`
75
78
  <credits>