-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrepl-example.js
More file actions
30 lines (21 loc) · 761 Bytes
/
repl-example.js
File metadata and controls
30 lines (21 loc) · 761 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
28
29
30
/*
* Readme interactive example
*/
// create a client instance with all commands (*)
var client = require( '../' )( { semver : '*' } )
//enable automatic console logging for events
client.cli()
// get info about a command via mixins (Syllabus) property
client.mixins.info('CoNfiG')
// you can also stick the #info method to all available commands
client.mixins.stick()
// now get info about a method/command
client.commands.ping.info()
// now get info about a nested method/command
client.commands.pubsub.numpat.info()
// ok stop, now execute the command
// client.commands.pubsub.numpat()
// ops, command is not sent but queued, then open client connection..
// client.connect()
// read your reply, then quit or disconnect
// client.commands.quit()