Skip to content

Commit d61dcd8

Browse files
committed
Handle Pagefind Intermediate Files
1 parent 8d6d36c commit d61dcd8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

package_abridge.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,15 @@ async function abridge() {
9393
_rmRegex(path.join(bpath, "static/js/"),/^wasm.*pagefind$/);
9494
_rmRegex(path.join(bpath, "static/js/"),/^pagefind.*pf_meta$/);
9595
_rmRegex(path.join(bpath, "static/js/"),/^pagefind-entry\.json$/);
96+
_rmRecursive(path.join(bpath, "static/js/index"));
97+
_rmRecursive(path.join(bpath, "static/js/fragment"));
9698
}
9799

98100
// cleanup
99101
_rmRegex(path.join(bpath, "static/js/"),/^pagefind\.js$/);//pagefind temporary intermediate files
100102
_rmRegex(path.join(bpath, "static/js/"),/^pagefind-.*\.js$/);//pagefind temporary intermediate files
101103
_rmRegex(path.join(bpath, "static/js/"),/^pagefind-.*\.css$/);//pagefind temporary intermediate files
102-
_rmRecursive(path.join(bpath, "static/js/index"));//pagefind temporary intermediate files
103-
_rmRecursive(path.join(bpath, "static/js/fragment"));//pagefind temporary intermediate files
104+
104105

105106
if (pwa) {// Update pwa settings, file list, and hashes.
106107
if (typeof pwa_VER !== 'undefined' && typeof pwa_NORM_TTL !== 'undefined' && typeof pwa_LONG_TTL !== 'undefined' && typeof pwa_TTL_NORM !== 'undefined' && typeof pwa_TTL_LONG !== 'undefined' && typeof pwa_TTL_EXEMPT !== 'undefined') {
@@ -332,6 +333,8 @@ if (args === ' offline') {
332333
_rmRegex(path.join(bpath, "static/js/"),/^wasm.*pagefind$/);
333334
_rmRegex(path.join(bpath, "static/js/"),/^pagefind.*pf_meta$/);
334335
_rmRegex(path.join(bpath, "static/js/"),/^pagefind-entry\.json$/);
336+
_rmRecursive(path.join(bpath, "static/js/index"));
337+
_rmRecursive(path.join(bpath, "static/js/fragment"));
335338
searchChange('elasticlunr');
336339
} else if (args === ' pagefind') {
337340
searchChange('pagefind');

0 commit comments

Comments
 (0)