From 3a8cffba8a3e1ddfca86d1a07bf8e9005b16dc6b Mon Sep 17 00:00:00 2001 From: jlukic Date: Fri, 17 Oct 2014 18:27:40 -0400 Subject: [PATCH] Iterating on install --- gulpfile.js | 45 ++++++++++++++++++++++----------------------- tasks/questions.js | 8 ++++---- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index a94958b32..feef84772 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -58,7 +58,8 @@ var output = config.paths.output, source = config.paths.source, - // derived + // local + overwrite = false, assetPaths = { uncompressed : path.relative(output.uncompressed, output.themes), compressed : path.relative(output.compressed, output.themes), @@ -305,7 +306,7 @@ gulp.task('version', 'Displays current version of Semantic', function(callback) ---------------*/ gulp.task('check install', false, function () { - if(1) { + if( !fs.existsSync(source.config) || !fs.existsSync(source.site) ) { setTimeout(function() { gulp.start('install'); }, 100); @@ -316,27 +317,25 @@ gulp.task('check install', false, function () { }); gulp.task('install', 'Set-up project for first time', function () { - if( !fs.existsSync(source.config) || !fs.existsSync(source.site) ) { - - console.clear(); - gulp - .src(defaults.paths.source.config) - .pipe(prompt.prompt(questions.setup, function( answers ) { - console.info('Creating site folder'); - console.info('Creating theme config file (semantic.config)'); - console.info('Creating build config file (semantic.json)'); - })) - .pipe(prompt.prompt(questions.site, function( answers ) { - console.info('Creating site variables file'); - })) - ; - - } - else { - console.log('has config'); - } - // ! - + console.clear(); + gulp + .src(defaults.paths.source.config) + .pipe(prompt.prompt(questions.setup, function( answers ) { + console.clear(); + console.log(answers); + console.log('Beginning install script...'); + console.info('Creating site folder'); + console.info('Creating theme config file (semantic.config)'); + console.info('Creating build config file (semantic.json)'); + console.log(''); + console.log(''); + })) + .pipe(prompt.prompt(questions.site, function( answers ) { + console.clear(); + console.log('Creating site theme file'); + console.info('Creating site variables file'); + })) + ; }); gulp.task('config', 'Configure basic site settings', function () { diff --git a/tasks/questions.js b/tasks/questions.js index f477dd537..a6a683acf 100644 --- a/tasks/questions.js +++ b/tasks/questions.js @@ -1,5 +1,5 @@ /******************************* - Set-up Questions + Install Questions *******************************/ var defaults, when; @@ -34,14 +34,14 @@ module.exports = { { type: 'list', name: 'install', - message: 'Set-up Semantic UI', + message: 'Set-up Themed Semantic UI (First-Run)', choices: [ { - name: 'Automatic (Use defaults locations and all packages)', + name: 'Automatic (Use defaults locations and include all packages)', value: 'auto' }, { - name: 'Express (Set components and output folder)', + name: 'Express (Set component list and output folder)', value: 'express' }, {