From 168437c0b0cdb01cc8d788b92415b31736f45500 Mon Sep 17 00:00:00 2001 From: jlukic Date: Fri, 31 Oct 2014 15:30:34 -0400 Subject: [PATCH] Fix typo referring to gulp, add error for missing semantic.json --- gulpfile.js | 7 +++++-- tasks/gulp-settings.js | 15 ++++++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index da4f92090..df5c58481 100755 --- a/gulpfile.js +++ b/gulpfile.js @@ -99,6 +99,9 @@ try { ; } catch(error) { + if(error.code === 'MODULE_NOT_FOUND') { + console.error('No semantic.json config found'); + } var config = false; } @@ -173,7 +176,7 @@ gulp.task('watch', 'Watch for site/theme changes (Default Task)', function(callb console.log('Watching source files for changes'); if(!fs.existsSync(config.files.theme)) { - console.error('Cant compile LESS. Run "grunt install" to create a theme config file'); + console.error('Cant compile LESS. Run "gulp install" to create a theme config file'); return; } @@ -301,7 +304,7 @@ gulp.task('build', 'Builds all files from source', function(callback) { console.info('Building Semantic'); if(!fs.existsSync(config.files.theme)) { - console.error('Cant build LESS. Run "grunt install" to create a theme config file'); + console.error('Cant build LESS. Run "gulp install" to create a theme config file'); return; } diff --git a/tasks/gulp-settings.js b/tasks/gulp-settings.js index f1f153963..351812c51 100755 --- a/tasks/gulp-settings.js +++ b/tasks/gulp-settings.js @@ -1,10 +1,19 @@ var + path = require('path'), fs = require('fs'), - package = (fs.existsSync('../package/.json')) - ? require('../package.json') - : false + package ; +try { + package = require('../package.json') +} +catch(error) { + // fallback + package = { + title : 'Semantic UI', + url : 'git://github.com/Semantic-Org/Semantic-UI.git' + } +} module.exports = { del: {