Browse Source

Add defaults as backup for tasks when not set-up yet

pull/1191/head
jlukic 10 years ago
parent
commit
3645905f12
3 changed files with 16 additions and 20 deletions
  1. 25
      gulpfile.js
  2. 2
      semantic.json.example
  3. 9
      tasks/defaults.js

25
gulpfile.js

@ -122,6 +122,15 @@ if(config) {
clean = base + clean;
}
else {
// use default values
var
base = defaults.base,
clean = defaults.paths.clean,
output = defaults.paths.output,
source = defaults.paths.source
;
}
/*******************************
Tasks
@ -324,12 +333,10 @@ gulp.task('build', 'Builds all files from source', function(callback) {
})
;
});
// cleans distribution files
gulp.task('clean', 'Clean dist folder', function(callback) {
console.log('Cleaning directory: ' + clean);
return del([clean], settings.del, callback);
});
@ -400,7 +407,7 @@ gulp.task('check install', false, function () {
});
gulp.task('install', 'Set-up project for first time', function () {
return gulp
gulp
.src(defaults.paths.source.config)
.pipe(prompt.prompt(questions.setup, function(answers) {
var
@ -531,18 +538,6 @@ gulp.task('install', 'Set-up project for first time', function () {
});
/* TODO add site theming into install process
gulp.task('config', 'Configure basic site settings', function () {
gulp.src('./')
.pipe(prompt.prompt(questions.site, function(answers) {
console.clear();
console.log('Creating site theme file');
console.info('Creating site variables file');
}))
});
*/

2
semantic.json.example

@ -12,7 +12,7 @@
"packaged" : "dist/",
"uncompressed" : "dist/components/",
"compressed" : "dist/components/",
"themes" : "dist/themes"
"themes" : "dist/themes/"
},
"clean" : "dist/"
}

9
tasks/defaults.js

@ -3,18 +3,19 @@
*******************************/
module.exports = {
base : '',
paths: {
source: {
config : 'src/theme.config',
definitions : 'src/definitions',
site : 'src/site',
themes : 'src/themes'
definitions : 'src/definitions/',
site : 'src/site/',
themes : 'src/themes/'
},
output: {
packaged : 'dist/',
uncompressed : 'dist/components/',
compressed : 'dist/components/',
themes : 'dist/themes'
themes : 'dist/themes/'
},
clean : 'dist/'
}
Loading…
Cancel
Save