Browse Source

Fix typo referring to gulp, add error for missing semantic.json

pull/1243/head
jlukic 10 years ago
parent
commit
168437c0b0
2 changed files with 17 additions and 5 deletions
  1. 7
      gulpfile.js
  2. 15
      tasks/gulp-settings.js

7
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;
}

15
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: {

Loading…
Cancel
Save