-
Notifications
You must be signed in to change notification settings - Fork 0
/
cli_defaults.mjs
46 lines (40 loc) · 1.35 KB
/
cli_defaults.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import assert from "assert";
import fs from "fs";
import path from "path";
export default {
// The input folder(s).
input: {
expected_args: Infinity, is_required: true,
assert: (dir) => assert(fs.statSync(dir).isDirectory()),
map: (dir) => path.resolve(dir)
},
// The destination folder. The current folder (./) is used as default.
output: {
default: "./",
assert: (dir) => assert(fs.statSync(dir).isDirectory()),
map: (dir) => path.resolve(dir)
},
// Structure that should be constructed in the output directory.
// Every slash will create a new subdirectory.
// The default is %Y/%B/%e which will result in 2020/February/1.
dirstruct: {
default: "%Y/%B/%e"
},
// The locale to be used for folder creation in the destination folder.
// Locales other than english need at least node v.13 or node build with full-icu.
// The default is en−US.
locale: {
default: "en-US"
},
// The files and/or folders names which shall not be copied.
// The regex must not be enclosed by slashes.
exclude: {
default: /^[]/,
assert: (regex) => assert(new RegExp(regex)),
map: (regex) => new RegExp(regex)
},
// Enables the creation/use of the cache file `folderize.cache'.
cache: {
is_flag: true
}
};