@canopy-iiif/app 1.3.5 → 1.3.6

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 (2) hide show
  1. package/lib/build/build.js +13 -0
  2. package/package.json +1 -1
@@ -1,5 +1,6 @@
1
1
  const {
2
2
  fs,
3
+ fsp,
3
4
  path,
4
5
  CONTENT_DIR,
5
6
  OUT_DIR,
@@ -27,6 +28,14 @@ const referenced = require("../components/referenced");
27
28
  let iiifRecordsCache = [];
28
29
  let pageRecords = [];
29
30
 
31
+ async function ensureNoJekyllMarker() {
32
+ try {
33
+ await fsp.mkdir(OUT_DIR, { recursive: true });
34
+ const markerPath = path.join(OUT_DIR, '.nojekyll');
35
+ await fsp.writeFile(markerPath, '', 'utf8');
36
+ } catch (_) {}
37
+ }
38
+
30
39
  async function build(options = {}) {
31
40
  const skipIiif = !!(options?.skipIiif || process.env.CANOPY_SKIP_IIIF === '1' || process.env.CANOPY_SKIP_IIIF === 'true');
32
41
  if (!fs.existsSync(CONTENT_DIR)) {
@@ -47,10 +56,14 @@ async function build(options = {}) {
47
56
  referenced?.resetReferenceIndex?.();
48
57
  if (!skipIiif) {
49
58
  await cleanDir(OUT_DIR);
59
+ await ensureNoJekyllMarker();
50
60
  logLine(`• Cleaned output directory`, "blue", { dim: true });
51
61
  } else {
52
62
  logLine("• Retaining cache (skipping IIIF rebuild)", "blue", { dim: true });
53
63
  }
64
+ if (skipIiif) {
65
+ await ensureNoJekyllMarker();
66
+ }
54
67
 
55
68
  /**
56
69
  * Build IIIF Collection content from configured source(s).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canopy-iiif/app",
3
- "version": "1.3.5",
3
+ "version": "1.3.6",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "Mat Jordan <mat@northwestern.edu>",