diff options
| author | Jieiku | 2023-11-05 08:01:44 -0800 |
|---|---|---|
| committer | Jieiku | 2023-11-05 08:01:44 -0800 |
| commit | 8fd6b499763eaecccee56004a4b3e8ec1fc34b7c (patch) | |
| tree | b53d66ef2eb10062870f06219cb237cae8f943cc /package_abridge.js | |
| parent | 87b76166b57e4ad30161b4a4170bd5c93442e81e (diff) | |
| download | abridge-8fd6b499763eaecccee56004a4b3e8ec1fc34b7c.tar.gz abridge-8fd6b499763eaecccee56004a4b3e8ec1fc34b7c.tar.bz2 abridge-8fd6b499763eaecccee56004a4b3e8ec1fc34b7c.zip | |
Fix npm run abridge missing static/js dir
Diffstat (limited to 'package_abridge.js')
| -rw-r--r-- | package_abridge.js | 8 |
1 files changed, 8 insertions, 0 deletions
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')) { |
