From 8fd6b499763eaecccee56004a4b3e8ec1fc34b7c Mon Sep 17 00:00:00 2001 From: Jieiku Date: Sun, 5 Nov 2023 08:01:44 -0800 Subject: Fix npm run abridge missing static/js dir --- package_abridge.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package_abridge.js b/package_abridge.js index 4f12bb5..52c704e 100644 --- a/package_abridge.js +++ b/package_abridge.js @@ -53,6 +53,14 @@ async function abridge() { console.log('Zola Build to generate files for minification:'); await execWrapper('zola build'); + //check that static/js exists, do this after zola build, it will handle creating static if missing. + var jsdir = 'static/js'; + try { + fs.mkdirSync(jsdir); + } catch(e) { + if (e.code != 'EEXIST') throw e; + } + // check if abridge is used directly or as a theme. bpath = ''; if (fs.existsSync('./themes')) { -- cgit v1.3.1