Giter VIP home page Giter VIP logo

nd's Introduction

ESLint

ND

New Design aims to replace blessed with a maintained, new, Typescript-based program. It tries to stay close to the blessed api, to avoid the need to change too much user-code.

TODO: add gif

Install

Npm:

npm i git+https://github.com/r0wanda/nd.git # todo: publish to npm

Yarn:

yarn add git+https://github.com/r0wanda/nd.git

Example

import nd from 'nd';

// Instantiate a screen class
const screen = new nd.Screen();

// Set window title (on some terminal emulators, may do nothing)
screen.title = 'my window title';

const box = new nd.Element({
    screen: screen, // One difference from blessed, screen is set at creation

    top: 'center',
    left: 'center',
    width: '50%',
    height: '50%',
    content: 'Hello {bold}world{/bold}!',
    tags: true, // Not required, tags is default now
    border: {
        type: 'line'
    },
    style: {
        fg: 'white',
        bg: 'magenta',
        border: {
            fg: '#f0f0f0' // Unlike blessed, this will be truecolor if supported!
        },
        hover: {
            bg: 'green',
        }
    }
});

// Quit on escape (using blob!), q, or Control-C
screen.key(['esc*', 'q', 'C-c'], (ch, key) => {
    process.exit(0);
});

screen.render();

nd's People

Contributors

r0wanda avatar

Stargazers

 avatar

Watchers

 avatar

nd's Issues

Change some names

Possibly change some names for internal functions not used by the common user
Not sure whether to add underscores in front or just to make them private (add #'s)
If anyone with experience writing libraries, please give me advice

Improve github actions

I suck at github actions so theres probably room for improvement on the existing typedoc one

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.