-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcli.js
More file actions
27 lines (25 loc) · 847 Bytes
/
cli.js
File metadata and controls
27 lines (25 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env node
'use strict'
var meow = require('meow')
var barHorizontal = require('./')
var cli = meow({
help: [
'Usage',
' $ bar-horizontal input-array',
' $ bar-horizontal input-array --values',
'',
'Examples',
' $ bar-horizontal 1 2 3 4',
' : ▇▇▇▇▇▇▇▇ 10%',
' : ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 20%',
' : ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 30%',
' : ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 40%',
'',
' $ bar-horizontal 1 2 3 4 --ascii ',
' : ====== 10.00%',
' : ============= 20.00%',
' : ==================== 30.00%',
' : =========================== 40.00%'
].join('\n')
});
barHorizontal(cli.input, cli.flags);