A react wrapper for cowsay-browser
npm -i react-cowsay --save
import Cowsay from 'react-cowsay' <Cowsay>I'm a cow!</Cowsay>
react-cowsay accepts almost all arguments from cowsay as props.
The only exception is
f which does not accept a filepath, though any of the included cows can be used.
The options for cowsay are replicated here for convenience:
-b Mode: Borg -d Mode: Dead -g Mode: Greedy -p Mode: Paranoia -s Mode: Stoned -t Mode: Tired -w Mode: Wired -y Mode: Youthful -e Select the appearance of the cow's eyes. [default: "oo"] -T The tongue is configurable similarly to the eyes through -T and tongue_string. [default: " "] -n If it is specified, the given message will not be word-wrapped. -W Specifies roughly where the message should be wrapped. The default is equivalent to -W 40 i.e. wrap words at or before the 40th column. [default: 40] -f Specifies a cow picture file (''cowfile'') to use. Use of the named cows included in the package. [default: "default"]
Additionally text can be specified either as a prop or as children.
<Cowsay>This works</Cowsay> <Cowsay text="This also works" />
The development environment is already setup and ready to go (hot-loading and linting included!)
- Build only your library component/components in /src folder (this is what will be published to npm)
- Rendering for testing/development should be done in /site/src (this can also be used as a static site for examples, docs, etc.)