0.0.7 • Published 2 years ago
foton-terminal v0.0.7
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()