@valtech-commerce/terminal
v3.2.0
Published
Terminal utilities
Downloads
2
Keywords
Readme
@valtech-commerce/terminal
Terminal utilities
Install
$ npm install @valtech-commerce/terminal
Usage
import { terminal } from '@valtech-commerce/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 '@valtech-commerce/terminal';
class MyBetterTerminal extends Terminal {
}
class MyBetterProcess extends Process {
}
Documentation
View documentation
License
MIT © Valtech Canada inc.