javascript - What is gulp.src for? -
im trying use gulp prompt:
gulp.src('test.js') .pipe(prompt.prompt({ type: 'input', name: 'task', message: 'which task run?' }, function(res){ //value in res.task (the name option gives key) }));
im confused gulp.src for? don't have src want prompt user input.
gulp.src
creates stream of source files perform 'piped' operations on. in example you're asking task perform, means you're asking task perform on file test.js
.
if want ask task perform, , run 1 or more gulp tasks think you'll need write plain old nodejs application asks input , start gulp [name of task]
there.
Comments
Post a Comment