|
@ -192,15 +192,20 @@ if(manager.name == 'NPM') { |
|
|
gulp.task('run setup', function() { |
|
|
gulp.task('run setup', function() { |
|
|
|
|
|
|
|
|
// If auto-install is switched on, we skip the configuration section and simply reuse the configuration from semantic.json
|
|
|
// If auto-install is switched on, we skip the configuration section and simply reuse the configuration from semantic.json
|
|
|
if (install.autoInstall()) { |
|
|
|
|
|
answers = install.autoInstall(); |
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
if(install.shouldAutoInstall()) { |
|
|
|
|
|
answers = { |
|
|
|
|
|
overwrite : 'yes', |
|
|
|
|
|
install : 'auto', |
|
|
|
|
|
}; |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
return gulp |
|
|
return gulp |
|
|
.src('gulpfile.js') |
|
|
|
|
|
.pipe(prompt.prompt(questions.setup, function(setupAnswers) { |
|
|
|
|
|
// hoist
|
|
|
|
|
|
answers = setupAnswers; |
|
|
|
|
|
})); |
|
|
|
|
|
|
|
|
.src('gulpfile.js') |
|
|
|
|
|
.pipe(prompt.prompt(questions.setup, function(setupAnswers) { |
|
|
|
|
|
// hoist
|
|
|
|
|
|
answers = setupAnswers; |
|
|
|
|
|
})) |
|
|
|
|
|
; |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
@ -214,9 +219,13 @@ gulp.task('create install files', function(callback) { |
|
|
if(answers.overwrite !== undefined && answers.overwrite == 'no') { |
|
|
if(answers.overwrite !== undefined && answers.overwrite == 'no') { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
console.clear(); |
|
|
console.clear(); |
|
|
console.log('Installing'); |
|
|
|
|
|
|
|
|
if(install.shouldAutoInstall()) { |
|
|
|
|
|
console.log('Auto-Installing (Without User Interaction)'); |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
console.log('Installing'); |
|
|
|
|
|
} |
|
|
console.log('------------------------------'); |
|
|
console.log('------------------------------'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -418,19 +427,21 @@ gulp.task('clean up install', function() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// If auto-install is switched on, we skip the configuration section and simply build the dependencies
|
|
|
// If auto-install is switched on, we skip the configuration section and simply build the dependencies
|
|
|
if (install.autoInstall()) { |
|
|
|
|
|
|
|
|
if(install.shouldAutoInstall()) { |
|
|
return gulp.start('build'); |
|
|
return gulp.start('build'); |
|
|
} else { |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
return gulp |
|
|
return gulp |
|
|
.src('gulpfile.js') |
|
|
|
|
|
.pipe(prompt.prompt(questions.cleanup, function(answers) { |
|
|
|
|
|
if(answers.cleanup == 'yes') { |
|
|
|
|
|
del(install.setupFiles); |
|
|
|
|
|
} |
|
|
|
|
|
if(answers.build == 'yes') { |
|
|
|
|
|
gulp.start('build'); |
|
|
|
|
|
} |
|
|
|
|
|
})); |
|
|
|
|
|
|
|
|
.src('gulpfile.js') |
|
|
|
|
|
.pipe(prompt.prompt(questions.cleanup, function(answers) { |
|
|
|
|
|
if(answers.cleanup == 'yes') { |
|
|
|
|
|
del(install.setupFiles); |
|
|
|
|
|
} |
|
|
|
|
|
if(answers.build == 'yes') { |
|
|
|
|
|
gulp.start('build'); |
|
|
|
|
|
} |
|
|
|
|
|
})) |
|
|
|
|
|
; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -443,4 +454,4 @@ runSequence( |
|
|
callback |
|
|
callback |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
}; |