Browse Source

Better fix #1518, add default components to tasks/default.js, load instead of specified components if none specified

pull/1550/head
jlukic 10 years ago
parent
commit
36edba74ee
3 changed files with 60 additions and 1 deletions
  1. 2
      gulpfile.js
  2. 57
      tasks/defaults.js
  3. 2
      tasks/questions.js

2
gulpfile.js

@ -134,7 +134,7 @@ var
? (config.components.length > 1)
? '{' + config.components.join(',') + '}'
: config.components[0]
: '{*}'
: '{' + defaults.components.join(',') + '}'
;
// relative paths

57
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',

2
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 },

Loading…
Cancel
Save