Introduce modes and add ability to switch mode of UI primitives
Pre-release
Pre-release
Breaking change
Earlier the cliui function accepted { raw: boolean; silent: boolean } options. These options are mutually exclusive and cannot be used together. Therefore, in this release we remove these options and introduce a single mode option.
mode = rawmeans we want to collect all logs in memory and disable transformationsmode = silentmeans we want to disable colors.mode = normalmeans turn off special modes.
New feature
Also, the UI primitives can toggle the mode after the UI kit has been instantiated.
const ui = cliui()
ui.switchMode('silent')
// Applies no transformation
ui.colors.green('hello world')Commits
- ci: force colors when running tests a50e1d3
- feat: add ability to switch renderer, colors and mode of ui primitives 995b937
Full Changelog: v5.1.0-0...v6.0.0-0