@@ -191,14 +191,17 @@ if(manager.name == 'NPM') {
191
191
192
192
gulp . task ( 'run setup' , function ( ) {
193
193
194
- return gulp
195
- . src ( 'gulpfile.js' )
196
- . pipe ( prompt . prompt ( questions . setup , function ( setupAnswers ) {
197
- // hoist
198
- answers = setupAnswers ;
199
- } ) )
200
- ;
201
-
194
+ // If auto-install is switched on, we skip the configuration section and simply reuse the configuration from semantic.json
195
+ if ( install . autoInstall ( ) ) {
196
+ answers = install . autoInstall ( ) ;
197
+ } else {
198
+ return gulp
199
+ . src ( 'gulpfile.js' )
200
+ . pipe ( prompt . prompt ( questions . setup , function ( setupAnswers ) {
201
+ // hoist
202
+ answers = setupAnswers ;
203
+ } ) ) ;
204
+ }
202
205
} ) ;
203
206
204
207
gulp . task ( 'create install files' , function ( callback ) {
@@ -414,17 +417,23 @@ gulp.task('clean up install', function() {
414
417
console . log ( '' ) ;
415
418
}
416
419
417
- return gulp
418
- . src ( 'gulpfile.js' )
419
- . pipe ( prompt . prompt ( questions . cleanup , function ( answers ) {
420
- if ( answers . cleanup == 'yes' ) {
421
- del ( install . setupFiles ) ;
422
- }
423
- if ( answers . build == 'yes' ) {
424
- gulp . start ( 'build' ) ;
425
- }
426
- } ) )
427
- ;
420
+ // If auto-install is switched on, we skip the configuration section and simply build the dependencies
421
+ if ( install . autoInstall ( ) ) {
422
+ return gulp . start ( 'build' ) ;
423
+ } else {
424
+ return gulp
425
+ . src ( 'gulpfile.js' )
426
+ . pipe ( prompt . prompt ( questions . cleanup , function ( answers ) {
427
+ if ( answers . cleanup == 'yes' ) {
428
+ del ( install . setupFiles ) ;
429
+ }
430
+ if ( answers . build == 'yes' ) {
431
+ gulp . start ( 'build' ) ;
432
+ }
433
+ } ) ) ;
434
+ }
435
+
436
+
428
437
} ) ;
429
438
430
439
runSequence (
0 commit comments