Newfangled Package Modernizer

    @absolunet/terminal

    3.1.0 • Public • Published

    @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

    Keywords

    Install

    npm i @absolunet/terminal

    DownloadsWeekly Downloads

    98

    Version

    3.1.0

    License

    MIT

    Unpacked Size

    41.8 kB

    Total Files

    7

    Last publish

    Collaborators

    • avatar
    • avatar