Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/valtech-commerce/terminal
Terminal utilities
https://github.com/valtech-commerce/terminal
chalk npm-package spinner terminal
Last synced: about 1 month ago
JSON representation
Terminal utilities
- Host: GitHub
- URL: https://github.com/valtech-commerce/terminal
- Owner: valtech-commerce
- License: mit
- Created: 2023-02-07T16:12:12.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-07T16:27:54.000Z (almost 2 years ago)
- Last Synced: 2024-11-06T22:50:02.053Z (2 months ago)
- Topics: chalk, npm-package, spinner, terminal
- Language: JavaScript
- Homepage: https://valtech-commerce.github.io/terminal/
- Size: 678 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# @valtech-commerce/terminal
[![npm](https://img.shields.io/npm/v/@valtech-commerce/terminal.svg)](https://www.npmjs.com/package/@valtech-commerce/terminal)
[![npm dependencies](https://david-dm.org/valtech-commerce/terminal/status.svg)](https://david-dm.org/valtech-commerce/terminal)
[![npms](https://badges.npms.io/%40valtech-commerce%2Fterminal.svg)](https://npms.io/search?q=%40valtech-commerce%2Fterminal)
[![Travis CI](https://api.travis-ci.org/valtech-commerce/terminal.svg?branch=main)](https://travis-ci.org/valtech-commerce/terminal/builds)> Terminal utilities
## Install
```sh
$ npm install @valtech-commerce/terminal
```## Usage
```js
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](https://valtech-commerce.github.io/terminal)
## License
MIT © [Valtech Canada inc.](https://www.valtech.ca/)