# @springernature/util-context-warning

> CLI messaging for installing Elements context dependencies

Latest version **0.0.5** (published 2020-04-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @springernature/util-context-warning
pnpm add @springernature/util-context-warning
yarn add @springernature/util-context-warning
bun add @springernature/util-context-warning
```

Provides the command `SNutilContextWarning`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2020-04-28 |
| First published | 2020-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 174.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Alex Kilgour |
| Maintainers | dotcode, hollsk, howlingmad, joey.ciechanowicz, joseluisbolos, jpw, moddular, nickcall, rlau, sndigital, sonniesedge |

## Links

- npm: https://www.npmjs.com/package/@springernature/util-context-warning
- Repository: https://github.com/springernature/frontend-toolkit-utilities
- Homepage: https://github.com/springernature/frontend-toolkit-utilities/tree/master/packages/util-context-warning#readme
- Issues: https://github.com/springernature/frontend-toolkit-utilities/issues
- npm.io page: https://npm.io/package/@springernature/util-context-warning

## Dependencies (3)

- [boxen](https://npm.io/package/boxen.md) ^4.2.0
- [kleur](https://npm.io/package/kleur.md) ^3.0.3
- [yargs](https://npm.io/package/yargs.md) ^15.1.0

## Recent versions

- 0.0.5 (latest) — 2020-04-28
- 0.0.4 — 2020-03-11
- 0.0.3 — 2020-02-04
- 0.0.2 — 2020-02-04
- 0.0.1 — 2020-02-04

## README

# Context Warning

[![NPM version][badge-npm]][info-npm]
[![Node version][badge-node]][info-node]
![MIT License][badge-license]

When installing a package from the Elements Design System, output some messaging to the command-line to warn about installing a valid brand context dependency in your application.

This package only handles formatting of the output message, working out valid dependencies needs to be done elsewhere.

## Command line usage

Use via NPX

```
$ npx @springernature/util-context-warning [options]
```

### Command line options

```
-p, --package  Name of package
-v, --versions  Space separated brand context versions in semver
-c, --context  Name of the brand context package. Default: @springernature/brand-context
```

### Example

```
$ npx @springernature/util-context-warning \
      -p @springernature/global-article@1.0.0 \
	  -v 1.0.0 2.0.0
```

![example output](https://raw.githubusercontent.com/springernature/frontend-toolkit-utilities/master/packages/util-context-warning/img/cli-standard.png)

#### Custom brand context name

```
$ npx @springernature/util-context-warning \
      -p @springernature/global-article@1.0.0 \
	  -v 1.0.0 2.0.0 \
	  -c @otherscope/othername
```

![example output](https://raw.githubusercontent.com/springernature/frontend-toolkit-utilities/master/packages/util-context-warning/img/cli-name.png)

#### No brand context versions

```
$ npx @springernature/util-context-warning \
      -p @springernature/global-article@1.0.0
```

![example output](https://raw.githubusercontent.com/springernature/frontend-toolkit-utilities/master/packages/util-context-warning/img/cli-error.png)

## License

[MIT License][info-license] &copy; 2020, Springer Nature

[info-npm]: https://www.npmjs.com/package/@springernature/util-context-warning
[badge-npm]: https://img.shields.io/npm/v/@springernature/util-context-warning.svg
[info-license]: https://github.com/springernature/frontend-toolkit-utilities/blob/master/LICENCE
[badge-license]: https://img.shields.io/badge/license-MIT-blue.svg
[badge-node]: https://img.shields.io/badge/node->=8-brightgreen.svg
[info-node]: package.json

---
_Source: https://npm.io/package/@springernature/util-context-warning · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
