SCREENSHOTS_DIR=0 to disable screenshots, fixes #172
This commit is contained in:
parent
22f673282b
commit
b5ead8ea21
6 changed files with 24 additions and 20 deletions
3
util.js
3
util.js
|
|
@ -7,6 +7,9 @@ const __dirname = path.dirname(__filename);
|
|||
// explicit object instead of Object.fromEntries since the built-in type would loose the keys, better type: https://dev.to/svehla/typescript-object-fromentries-389c
|
||||
export const dataDir = s => path.resolve(__dirname, 'data', s);
|
||||
|
||||
// modified path.resolve to return null if first argument is '0', used to disable screenshots
|
||||
export const resolve = (...a) => a.length && a[0] == '0' ? null : path.resolve(...a);
|
||||
|
||||
// json database
|
||||
import { Low } from 'lowdb';
|
||||
import { JSONFile } from 'lowdb/node';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue