npm.io
0.0.7 • Published 4 years ago

foton-terminal

Licence
MIT
Version
0.0.7
Deps
0
Size
15 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

Foton Terminal

Foton Terminal is a CLI formatting tool that structures output in a similar way to React elements.

Getting started

Install

npm i -D foton-terminal
Add a new element
import Foton from 'foton-terminal'

const greeting = new Foton.Element('p')
greeting.content = 'Hello World!'

greeting.print()
// Prints 'Hello World!' to the CLI
Apply styling to element
import Foton from 'foton-terminal'

const status = new Foton.Element('p')
status.content = 'Passing'

status.style = {
  backgroundColor: 'green',
  color: 'black',
  margin: 2,
  textTransform: 'uppercase',
}

status.print()
Screenshot 2021-12-03 at 14 25 50

Keywords