Mercurial > obsidian-remember-file-state
comparison esbuild.config.mjs @ 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 | 1c8e46c3e941 |
children | bdaa6e2c18d6 |
comparison
equal
deleted
inserted
replaced
41:aa9bc7754c5d | 42:d52beb77d109 |
---|---|
11 https://github.com/ludovicchabant/obsidian-remember-file-state | 11 https://github.com/ludovicchabant/obsidian-remember-file-state |
12 */ | 12 */ |
13 `; | 13 `; |
14 | 14 |
15 const prod = (process.argv[2] === 'production'); | 15 const prod = (process.argv[2] === 'production'); |
16 const dogfood = (process.argv[2] === 'dogfood'); | |
16 | 17 |
17 var outdir = (process.argv[2] === 'dogfood' ? process.argv[3] : ''); | 18 var outdir = (dogfood ? process.argv[3] : ''); |
18 if (outdir != undefined && outdir != '') { | 19 if (outdir != undefined && outdir != '') { |
19 if (outdir.slice(-1) != '/' && outdir.slice(-1) != "\\") { | 20 if (outdir.slice(-1) != '/' && outdir.slice(-1) != "\\") { |
20 outdir += '/'; | 21 outdir += '/'; |
21 } | 22 } |
22 } else { | 23 } else if (dogfood) { |
23 throw("Please provide an output directory to put the dog food into"); | 24 throw("Please provide an output directory to put the dog food into"); |
24 } | 25 } |
25 | 26 |
26 const outfile = outdir + 'main.js'; | 27 const outfile = outdir + 'main.js'; |
27 | 28 |