Updated readme. Made it so the CLI shows the correct version.

This commit is contained in:
Sergio Díaz 2017-04-05 23:03:53 -06:00
parent 431080283d
commit e70fb135b6
2 changed files with 9 additions and 7 deletions

View File

@ -30,20 +30,20 @@ Beau, is a CLI that executes HTTP requests based on a YAML configuration file. T
VERSION: 1 VERSION: 1
HOST: https://example.com/api/ HOST: https://example.com/api/
POST /session: POST /session:
ALIAS: $session ALIAS: session
PAYLOAD: PAYLOAD:
username: seich username: seich
password: hello01 password: hello01
GET /profile GET /profile
ALIAS: $profile ALIAS: profile
HEADERS: HEADERS:
authorization: Bearer $session.response.body.token authorization: Bearer $session.response.body.token
GET /user/$profile.response.body.id/posts GET /user/$profile.response.body.id/posts
ALIAS: $friends ALIAS: friends
HEADERS: HEADERS:
authorization: Bearer $session.response.body.token authorization: Bearer $session.response.body.token
PARAMS: PARAMS:

View File

@ -7,8 +7,10 @@ const { Line, Spinner } = require('clui');
const clc = require('cli-color'); const clc = require('cli-color');
const eyes = require('eyes'); const eyes = require('eyes');
const package = require('../package.json');
program program
.version('0.0.1') .version(package.version)
.usage(`[options] -r <Request Alias>`) .usage(`[options] -r <Request Alias>`)
.option('-r, --request [request]', `The alias for the request you'd like to trigger.`) .option('-r, --request [request]', `The alias for the request you'd like to trigger.`)
.option('-v, --verbose', `Show all the information related to the current request and it's response.`) .option('-v, --verbose', `Show all the information related to the current request and it's response.`)