# bscript

> Creates a tree of elements

Latest version **0.1.0** (published 2016-07-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install bscript
pnpm add bscript
yarn add bscript
bun add bscript
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2016-07-13 |
| First published | 2016-07-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Matt Styles |
| Maintainers | mattstyles |
| Keywords | blessed, tree, bscript, hyperscript |

## Links

- npm: https://www.npmjs.com/package/bscript
- Repository: https://github.com/mattstyles/bscript
- Homepage: https://github.com/mattstyles/bscript#readme
- Issues: https://github.com/mattstyles/bscript/issues
- npm.io page: https://npm.io/package/bscript

## Recent versions

- 0.1.0 (latest) — 2016-07-13

## README

# bscript

> Creates a tree of elements

[![npm version](https://badge.fury.io/js/bscript.svg)](https://badge.fury.io/js/bscript)
[![Dependency Status](https://david-dm.org/mattstyles/bscript.svg)](https://david-dm.org/mattstyles/bscript)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)

## Install

Install with [npm](https://npmjs.com)

```sh
$ npm i -S bscript
```

## Example

```js
const b = require('bscript')

b('box', {
  top: 2,
  left: 2
}, 'Page', [
  b('text', 'Title')
])
```

## Usage

`bscript` will return a tree of nodes which can be fed into a render function to produce output on the screen.

```js
const b = require('bscript')
const render = require('bscript-render')
const blessed = require('blessed')

const screen = blessed.screen({
  title: 'example'
})

screen.on('keypress', (ch, key) => {
  if (['escape', 'q', 'C-c'].includes(key.full)) {
    process.exit(0)
  }
})

render(b('text', 'Hello World'), screen)
```

## Contributing

Pull requests are always welcome, the project uses the [standard](http://standardjs.com) code style.

For bugs and feature requests, [please create an issue](https://github.com/mattstyles/bscript/issues).

## License

MIT

---
_Source: https://npm.io/package/bscript · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
