Skip to content

Commit 9ebe06f

Browse files
committed
🎉 Initial Commit
1 parent b6df7a0 commit 9ebe06f

File tree

3 files changed

+35
-8
lines changed

3 files changed

+35
-8
lines changed

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ Command Line UI components for Node.js
99
:: [Test](#test)
1010
:: [Build](#build)
1111

12-
### Dependencies
13-
14-
1. chalk
15-
2. draftlog
16-
1712
### Setup
1813
> Installing this module in your project
1914
```bash
@@ -25,9 +20,11 @@ npm install nodeui
2520
### Usage
2621
```ts
2722
import * as chalk from 'chalk';
28-
import {Spinner, Gauge, Sparkline, Progress, Line, LineBuffer} from 'nodeui'
23+
import {Banner, Gauge, Spinner, Sparkline, Progress, Line, LineBuffer} from 'nodeui'
2924
(async () => {
3025
try {
26+
const banner = new Banner(' Node UI is Awesome! See what you can build with this module ');
27+
3128
let spinner = new Spinner('initial message');
3229
spinner.start();
3330
await sleep(800);

examples.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
import * as chalk from 'chalk';
2-
import {Banner, Spinner, Sparkline, Progress, Line, LineBuffer} from './src/index'
2+
import * as os from 'os';
3+
import {Banner, Gauge, Spinner, Sparkline, Progress, Line, LineBuffer} from './src/index'
34
require('draftlog').into(console);
45

56

7+
/********************/
8+
9+
var total = os.totalmem();
10+
var free = os.freemem();
11+
var used = total - free;
12+
var human = Math.ceil(used / 1000000) + ' MB';
13+
console.log('' + new Gauge(used, total, 20, total * 0.8, chalk.bold.grey(human)));
14+
15+
/********************/
616

717
const reqsPerSec = [10,12,3,7,12,9,23,10,9,19,16,18,12,12];
818

package.json

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,28 @@
22
"name": "nodeui",
33
"version": "0.1.0",
44
"description": "Command Line UI components for Node.js",
5+
"keywords": [
6+
"UI",
7+
"cli",
8+
"node",
9+
"Banner",
10+
"Spinner",
11+
"Progress",
12+
"Sparkline"
13+
],
514
"main": "index.js",
6-
"author": "Sumanth Chinthagunta",
15+
"author": {
16+
"name": "Sumanth Chinthagunta",
17+
"email": "xmlking+git@gmail.com"
18+
},
19+
"repository": {
20+
"type": "git",
21+
"url": "git+https://github.com/xmlking/nodeui.git"
22+
},
23+
"bugs": {
24+
"url": "https://github.com/xmlking/nodeui/issues"
25+
},
26+
"homepage": "https://github.com/xmlking/nodeui#readme",
727
"license": "MIT",
828
"scripts": {
929
"prebuild": "node tools/delete.js",

0 commit comments

Comments
 (0)