README
bscript-tree
Creates a tree of blessed elements
Install
Install with npm
$ npm i -S bscript-tree
Example
const b = require('bscript-tree')
Usage
const tree = b('element', [
b('box', {
top: 0,
left: 0,
width: '100%',
height: 1,
content: 'Hello'
})
])
API
b (type, attr, children)
type<String>
The type of blessed element, not all elements are currently supported, and neither are custom elements just yet.
attr<Object>
Element attributes for this element.
children<Array>
Array of child elements.
Running tests
$ npm install
$ npm test
Contributing
Pull requests are always welcome, the project uses the standard code style. Please run npm test
to ensure all tests are passing and add tests for any new features or updates.
For bugs and feature requests, please create an issue.
License
MIT