Skip to content

Commit

Permalink
Add defaults as backup for tasks when not set-up yet
Browse files Browse the repository at this point in the history
  • Loading branch information
jlukic committed Oct 20, 2014
1 parent e5166aa commit 3645905
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 20 deletions.
25 changes: 10 additions & 15 deletions gulpfile.js
Expand Up @@ -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
Expand Down Expand Up @@ -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);
});

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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');
}))
});
*/



Expand Down
2 changes: 1 addition & 1 deletion semantic.json.example
Expand Up @@ -12,7 +12,7 @@
"packaged" : "dist/",
"uncompressed" : "dist/components/",
"compressed" : "dist/components/",
"themes" : "dist/themes"
"themes" : "dist/themes/"
},
"clean" : "dist/"
}
Expand Down
9 changes: 5 additions & 4 deletions tasks/defaults.js
Expand Up @@ -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/'
}
Expand Down

0 comments on commit 3645905

Please sign in to comment.