From 36edba74eea4d7ba92d367a15242532b174eec03 Mon Sep 17 00:00:00 2001 From: jlukic Date: Mon, 29 Dec 2014 12:37:16 -0500 Subject: [PATCH] Better fix #1518, add default components to tasks/default.js, load instead of specified components if none specified --- gulpfile.js | 2 +- tasks/defaults.js | 57 ++++++++++++++++++++++++++++++++++++++++++++++ tasks/questions.js | 2 ++ 3 files changed, 60 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 05cd31465..107de64a0 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -134,7 +134,7 @@ var ? (config.components.length > 1) ? '{' + config.components.join(',') + '}' : config.components[0] - : '{*}' + : '{' + defaults.components.join(',') + '}' ; // relative paths diff --git a/tasks/defaults.js b/tasks/defaults.js index 10083cdee..6b23542cb 100644 --- a/tasks/defaults.js +++ b/tasks/defaults.js @@ -23,6 +23,63 @@ module.exports = { './src/_site' ], + components: [ + // global + 'reset', + 'site', + // elements + 'button', + 'divider', + 'flag', + 'header', + 'icon', + 'image', + 'input', + 'label', + 'list', + 'loader', + 'rail', + 'reveal', + 'segment', + 'step', + // collections + 'breadcrumb', + 'form', + 'grid', + 'menu', + 'message', + 'table', + // views + 'ad', + 'card', + 'comment', + 'feed', + 'item', + 'statistic', + // modules + 'accordion', + 'checkbox', + 'dimmer', + 'dropdown', + 'modal', + 'nag', + 'popup', + 'progress', + 'rating', + 'search', + 'shape', + 'sidebar', + 'sticky', + 'tab', + 'transition', + 'video', + // behaviors + 'api', + 'form', + 'state', + 'visibility' + ], + // modified to create configs templates: { config : './semantic.json.example', diff --git a/tasks/questions.js b/tasks/questions.js index d985d5841..687ac4e77 100644 --- a/tasks/questions.js +++ b/tasks/questions.js @@ -87,6 +87,8 @@ module.exports = { type: 'checkbox', name: 'components', message: 'What components should we include in the package?', + + // duplicated manually from tasks/defaults.js with additional property choices: [ { name: "reset", checked: true }, { name: "site", checked: true },