I'm using prompt in various tasks without problems, but if I try to use a confirm i get this error:
TypeError: prompt.confirm is not a function
at Gulp.<anonymous> (/Users/.../project/gulpfile.js:178:18)
at module.exports (/Users/.../project/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/Users/.../project/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/Users/.../project/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
at /Users/.../project/node_modules/gulp/node_modules/orchestrator/index.js:279:18
at finish (/Users/.../project/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
at module.exports (/Users/.../project/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:60:3)
at Gulp.Orchestrator._runTask (/Users/.../project/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/Users/.../project/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
at Gulp.Orchestrator.start (/Users/.../project/node_modules/gulp/node_modules/orchestrator/index.js:134:8)
at runNextSet (/Users/.../project/node_modules/run-sequence/index.js:88:16)
at runSequence (/Users/.../project/node_modules/run-sequence/index.js:99:2)
at Gulp.<anonymous> (/Users/.../project/gulpfile.js:164:5)
at module.exports (/Users/.../project/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/Users/.../project/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/Users/.../project/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
var gulp = require('gulp'),
prompt = require('gulp-prompt').prompt,
otherDependances = require('...');
gulp.task('theme:project', function(){
gulp.src(includes.projectFiles)
.pipe(prompt.confirm({
message: 'Would you like to place frontsize automation project files on your main project root folder?\nWARNING: package.json, Gruntfile.js and gulpfile.js will be overwritten.',
default: true
}))
.pipe(prompt({
type: 'input',
name: 'path',
message: 'Set the main project root folder:'
}, function(res){
includes.rootFolder = res.path;
}));
runSequence('theme:rootProject');
});
gulp.task('theme:rootProject', function(){
return gulp.src(includes.projectFiles)
.pipe(gulpCopy(includes.rootPath));
});
I've excluded the tasks which works fine.