diff --git a/core/discovery/default-config.js b/core/discovery/default-config.js index 85c0824..9174cc9 100644 --- a/core/discovery/default-config.js +++ b/core/discovery/default-config.js @@ -10,6 +10,11 @@ const defaultConfig = { pageTree: { layoutStyle: 'sidebar' }, + /** + * Partials generation: this flag determines + * whether the components partials get generated + */ + partials: false, /** * CSS and JS minification * Adjust these values to set up your project for production or dev @@ -86,4 +91,4 @@ const defaultConfig = { }, }; -module.exports = defaultConfig; \ No newline at end of file +module.exports = defaultConfig; diff --git a/gulpfile.js b/gulpfile.js index 93ea062..6b12f37 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -47,15 +47,14 @@ gulp.task('templates:compile:partials', templates.compile.partials); gulp.task('templates:compile:styleguide', templates.compile.styleguide); gulp.task('templates:compile:docs', templates.compile.docs); -gulp.task( - 'templates:compile', - config.styleguide ? - gulp.parallel( - 'templates:compile:content', 'templates:compile:partials', - 'templates:compile:styleguide', 'templates:compile:docs') : - gulp.parallel( - 'templates:compile:content', 'templates:compile:partials') -); +var compileTasks = ['templates:compile:content']; +if (config.partials) { + compileTasks.push('templates:compile:partials'); +} +if (config.styleguide) { + compileTasks.push('templates:compile:styleguide', 'templates:compile:docs'); +} +gulp.task('templates:compile', gulp.parallel(...compileTasks)); gulp.task('watch', watch); gulp.task('copy', gulp.parallel('copy:images', 'copy:fonts', 'copy:resources', 'copy:scripts', 'copy:favicon'));