@dimerapp/cli-utils

Handy utils for Dimer CLI

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@dimerapp/cli-utils
1.0.36 years ago6 years agoMinified + gzip package size for @dimerapp/cli-utils in KB

Readme

<img width="500" src="https://res.cloudinary.com/adonisjs/image/upload/q_100/v1532274184/Dimer_Readme_Banner_lyy7wv.svg" alt="Dimer App">

<a href="https://dimerapp.com/what-is-dimer">
  Dimer is an open source project and CMS to help you publish your documentation online.
</a>


<sub>We believe every project/product is incomplete without documentation. <br /> We want to help you publish user facing documentation, without worrying <code>about tools or code</code> to write.</sub>


Dimer cli utils
Handy utils for Dimer CLI.

!npm-imagenpm-url
There's no need for this package. But I am finding myself creating more small packages, over sticking everything to one repo.

Installation

npm i @dimerapp/cli-utils

# Yarn
yarn add @dimerapp/cli-utils

API

info(message, newLine) ⇒ void

Prints info message in yellow color

error(error, newLine) ⇒ void

Prints error message in red color

attention(message, newLine) ⇒ void

Prints message with Attention label in magenta color

action(action, message)void

Prints action in cyan color with it's message

wrapInBraces(lhs, rhs, newLine) ⇒ void

Wrap a statement with lhs and rhs inside braces style

versionsProgress(versions)void

Log updates for multiple versions. The log will re-write on the same lines.

A version node must have.

  • no
  • processed
  • total
filesErrors(basePath, errors)void

Print all errors for multiple files. Errors must be part of vfile messages.

Base path is required to shorten the file names

configErrors(errors)void

Print config errors produced by @dimerapp/config-parser


info(message, newLine) ⇒ void

Prints info message in yellow color
Kind: global function
| Param | Type | Default | | --- | --- | --- | | message | String | | | newLine | Boolean | false |

error(error, newLine) ⇒ void

Prints error message in red color
Kind: global function
| Param | Type | Default | | --- | --- | --- | | error | Error \| String | | | newLine | Boolean | false |

attention(message, newLine) ⇒ void

Prints message with Attention label in magenta color
Kind: global function
| Param | Type | Default | | --- | --- | --- | | message | String | | | newLine | Boolean | false |

action(action, message) ⇒ void

Prints action in cyan color with it's message
Kind: global function
| Param | Type | | --- | --- | | action | String | | message | String |

wrapInBraces(lhs, rhs, newLine) ⇒ void

Wrap a statement with lhs and rhs inside braces style
Kind: global function
| Param | Type | Default | | --- | --- | --- | | lhs | String | | | rhs | String | | | newLine | Boolean | false |

versionsProgress(versions) ⇒ void

Log updates for multiple versions. The log will re-write on the same lines.
A version node must have.
  • no
  • processed
  • total

Kind: global function
| Param | Type | | --- | --- | | versions | Array |

filesErrors(basePath, errors) ⇒ void

Print all errors for multiple files. Errors must be part of vfile messages.
Base path is required to shorten the file names
Kind: global function
| Param | Type | | --- | --- | | basePath | String | | errors | Array |

configErrors(errors) ⇒ void

Print config errors produced by @dimerapp/config-parser
Kind: global function
| Param | Type | | --- | --- | | errors | Array |

Change log

The change log can be found in the CHANGELOG.md file.

Contributing

Everyone is welcome to contribute. Please take a moment to review the contributing guidelines.

Authors & License

thetutlage and contributors.
MIT License, see the included MIT file.