Mercurial > obsidian-remember-file-state
changeset 42:d52beb77d109
Better error message for incorrect usage of dogfood build mode
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 20 Sep 2023 17:19:46 -0700 |
parents | aa9bc7754c5d |
children | 7e981d54a055 |
files | esbuild.config.mjs |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/esbuild.config.mjs Wed Sep 20 17:19:11 2023 -0700 +++ b/esbuild.config.mjs Wed Sep 20 17:19:46 2023 -0700 @@ -13,13 +13,14 @@ `; const prod = (process.argv[2] === 'production'); +const dogfood = (process.argv[2] === 'dogfood'); -var outdir = (process.argv[2] === 'dogfood' ? process.argv[3] : ''); +var outdir = (dogfood ? process.argv[3] : ''); if (outdir != undefined && outdir != '') { if (outdir.slice(-1) != '/' && outdir.slice(-1) != "\\") { outdir += '/'; } -} else { +} else if (dogfood) { throw("Please provide an output directory to put the dog food into"); }