Update README.md to mention ui.log

- added missing docs for ui.log
This commit is contained in:
Hannah Wolfe 2019-04-05 12:41:24 +01:00 committed by GitHub
parent 8a36066e81
commit 982e045ba4

View File

@ -32,6 +32,15 @@ prettyCLI
.parseAndExit();
```
Pretty CLI also provides a common UI interface, providing log functions to output coloured messages to the UI:
```
const ui = require('@tryghost/pretty-cli/ui');`
ui.log.info('Done');
ui.log.warn('Uh Oh', 'Something went wrong');
```
You can also grab a fresh instance of the api with `prettyCLI.Api.get()`.
The style rules used are available at `prettyCLI.styles`.