bscript-tree

0.1.0 • Public • Published

bscript-tree

Creates a tree of blessed elements

npm version Dependency Status js-standard-style

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

/bscript-tree/

    Package Sidebar

    Install

    npm i bscript-tree

    Weekly Downloads

    1

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • mattstyles