@springernature/util-context-warning

CLI messaging for installing Elements context dependencies

Usage no npm install needed!

<script type="module">
  import springernatureUtilContextWarning from 'https://cdn.skypack.dev/@springernature/util-context-warning';
</script>

README

Context Warning

NPM version Node version MIT 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

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

No brand context versions

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

example output

License

MIT License © 2020, Springer Nature