Skip to content

Instantly share code, notes, and snippets.

@kharandziuk
Created August 5, 2019 11:49
Show Gist options
  • Select an option

  • Save kharandziuk/86d961b5ba9263ea8eb4d192cb5772d3 to your computer and use it in GitHub Desktop.

Select an option

Save kharandziuk/86d961b5ba9263ea8eb4d192cb5772d3 to your computer and use it in GitHub Desktop.
gulp4 and prompt example
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