Skip to content

Commit

Permalink
Minify files and fix running in script
Browse files Browse the repository at this point in the history
  • Loading branch information
Hysterelius committed Jul 6, 2024
1 parent 0394a84 commit c8e2609
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions package_abridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const replace = require('replace-in-file');
const util = require("util");
const { exec } = require("child_process");
const execPromise = util.promisify(exec);
const pagefind_index = require('./static/js/pagefind.index.js');

if (!(fs.existsSync('config.toml'))) {
throw new Error('ERROR: cannot find config.toml!');
Expand Down Expand Up @@ -124,9 +123,7 @@ async function abridge() {
replace.sync({files: 'content/static/tinysearch_json.md', from: /draft.*=.*/g, to: "draft = true"});
}




require('./static/js/pagefind.index.js');
}

if (pwa) {// Update pwa settings, file list, and hashes.
Expand Down Expand Up @@ -266,6 +263,10 @@ function bundle(bpath,js_prestyle,js_switcher,js_email_encode,js_copycode,search
minify_files.push(bpath+'static/js/stork_config.js');
} else if (search_library === 'tinysearch') {
minify_files.push(bpath+'static/js/tinysearch.js');
} else if (search_library === 'pagefind') {
minify_files.push(bpath+'static/js/pagefind.js');
minify_files.push(bpath+'static/js/pagefind-highlight.js');
minify_files.push(bpath+'static/js/pagefind-ui.js');
}
}
if (pwa) {
Expand Down

0 comments on commit c8e2609

Please sign in to comment.