Created
August 5, 2019 11:49
-
-
Save kharandziuk/86d961b5ba9263ea8eb4d192cb5772d3 to your computer and use it in GitHub Desktop.
gulp4 and prompt example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const gulp = require('gulp'); | |
| const util = require('util') | |
| const prompt = require('prompt') | |
| const schema = { | |
| properties: { | |
| password: { | |
| hidden: true | |
| } | |
| } | |
| }; | |
| function test() { | |
| prompt.start(); | |
| return util.promisify(prompt.get)(schema).then(({ password }) => { | |
| return console.log(password) | |
| }) | |
| } | |
| exports.test = test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment