Skip to content

Commit

Permalink
Add: Boolean Example with Header
Browse files Browse the repository at this point in the history
  • Loading branch information
adityavyas611 committed Dec 29, 2019
1 parent 4bf33a3 commit 483fd55
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
15 changes: 15 additions & 0 deletions examples/boolean/option-header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
'use strict';

const begoo = require('begoo');
const { BooleanPrompt } = require('enquirer');

const prompt = new BooleanPrompt({
name: 'answer',
header: begoo('Welcome to Boolean Prompt'),
message: 'Did you like enquirer?',
initial: false
});

prompt.run()
.then(answer => console.log('Answer:', answer))
.catch(console.error);
3 changes: 2 additions & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"open": "^6.4.0",
"qrcode-terminal": "^0.12.0",
"semver": "^5.6.0",
"yosay": "^2.0.2"
"yosay": "^2.0.2",
"begoo": "^1.1.2"
}
}

0 comments on commit 483fd55

Please sign in to comment.