1.1.7 • Published 4 months ago
ezi-console v1.1.7
ezi-console - a set of methods for simple and clear output to the console
import ezcl from 'ezi-console';
ezcl.notice({
notice: 'Hello World'
});
">" is part of the output
# there is an empty line here
> type: notice
> notice: Hello World
# there is an empty line here
Although it is not visible here, type: notice is blue colored
ezcl.error({
error: 'Oops, error',
comment: 'Fix pls',
path: './this/func.js',
exit: true
});
# there is an empty line here
> type: error
> error: Oops, error
> comment: Fix, pls
> path: ./this/func.js
# there is an empty line here
you can add silent if you don't want to output due to some circumstances
ezcl.warn({
warn: 'This flag is no longer relevant',
comment: 'please use -D',
name: '--save-dev'
});
# there is an empty line here
> type: warn
> warn: This flag is no longer relevant
> comment: please use -D
> name: --save-dev
# there is an empty line here
you can turn off empty lines
ezcl.custom({
type: null,
comment: 'Hello World',
commentKey: 'message',
space: false
});
> message: Hello World