@absolunet/terminal

Terminal utilities

Stats

StarsIssuesVersionUpdatedCreatedSize
@absolunet/terminal
003.1.0a year ago5 years agoMinified + gzip package size for @absolunet/terminal in KB

Readme

@absolunet/terminal

npm npm dependencies npms Travis CI

Terminal utilities

Install

$ npm install @absolunet/terminal

Usage

import { terminal } from '@absolunet/terminal';

terminal.setTheme({
    logo:                  '🍭',
    textColor:             terminal.basicColor.magenta,
    backgroundColor:       '#cc00cc',
    textOnBackgroundColor: terminal.basicColor.white,
    spinnerColor:          terminal.basicColor.magenta
});

terminal
    .titleBox('Start');
    .startSpinner('Checking dependencies')
;

terminal.process.runAsync('npm outdated', { silent:true }).then(({ stdout }) => {
    terminal.stopSpinner();

    if (stdout) {
        terminal
            .spacer();
            .failure('Please update your project')
        ;
    } else {
        terminal.success('You are up to date!');
    }

    terminal.completionBox();
});


// Extend it
import { Terminal, Process } from '@absolunet/terminal';

class MyBetterTerminal extends Terminal {

}

class MyBetterProcess extends Process {

}

Documentation

View documentation



License

MIT © Absolunet

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.