config/quiet-verbose
The quiet and verbose options are quite simple: how much should umejs say? With verbose meaning: it should say a lot and quiet it should just shut up. Here's how you can set either of these settings:
const ume = require("@dantenl/umejs")
const path = require('path');
ume({
quiet: true, // default: false
// example contentDir and templatePath
contentDir: path.join(__dirname, 'content'),
templatePath: path.join(__dirname, 'layout.ume.html'),
})
// verbose
ume({
verbose: true, // default: false
// example contentDir and templatePath
contentDir: path.join(__dirname, 'content'),
templatePath: path.join(__dirname, 'layout.ume.html'),
})
However, in most cases not changing either of these is fine!
Note
If you have both
quietandverboseset totrue,verbosewill take priority and overridequiet.
Here's a quick example showcasing the difference in logging when starting up the server.
Here's the default amount of logging:
[umejs] Initialising project at /Users/dante_nl/Projects/ume-test/v1
[umejs] 14 Markdown file(s) in /Users/dante_nl/Projects/ume-test/v1 have been generated.
[umejs] All files built - took 60ms
Server running at http://localhost:3000
When quiet is set to true, umejs will only log errors. When starting up umejs, the only message in the console is Server running at http://localhost:3000, though that's not generated by umejs.
If you have verbose set to true, umejs will basically announce everything that it's doing:
[umejs] Initialising project at /Users/dante_nl/Projects/ume-test/v1
[umejs] Found 14 Markdown file(s) in /Users/dante_nl/Projects/ume-test/v1
[umejs] Building config/builders.md...
[umejs] Built config/builders.md
[umejs] Building config/content-dir.md...
[umejs] Initialising variable title
[umejs] Initialising variable edited
[umejs] Built config/content-dir.md
(... 35 lines removed for brevity)
[umejs] Building test.md...
[umejs] Built test.md
[umejs] 14 Markdown file(s) in /Users/dante_nl/Projects/ume-test/v1 have been generated.
[umejs] All files built - took 43ms
Server running at http://localhost:3000