Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to properly integrate gulp-prompt in the pipe together with other plugins? #78

Open
stefanobartoletti opened this issue Jan 15, 2020 · 0 comments

Comments

@stefanobartoletti
Copy link

stefanobartoletti commented Jan 15, 2020

I'm sorry if this question has a simple answer, but I spent quite some time trying to integrate gulp-prompt in my tasks and I don't seem to be able to make it work correctly.

As an example, here is the definition of a sample task, taken from your own examples and slightly modified to be written in the Gulp 4 default task syntax:

function setversion(done) {
	src('test.js')
		.pipe(prompt.prompt({
			type: 'checkbox',
			name: 'bump',
			message: 'What type of bump would you like to do?',
			choices: ['patch', 'minor', 'major']
		}, function(res){
			//value is in res.bump (as an array)
		}))
		.pipe(dest('./'))
	done();
}

exports.setversion = setversion;

If I want, in example, integrate gulp-bump and passing to it the value taken from choices, what exactly should I write in the line that currently has //value is in res.bump (as an array)?
Like I said I've tried a lot but can't seem to find the proper syntax to make this work correctly.

Thank you in advance for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant