From: Geoff Kimball Date: Fri, 11 Mar 2016 22:17:24 +0000 (-0800) Subject: Add customizer presets for complete and essential download X-Git-Tag: v6.2.1~30^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f61d486ea370e53ce49246a71d2914be6fced820;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Add customizer presets for complete and essential download --- diff --git a/customizer/build-template.json b/customizer/build-template.json deleted file mode 100644 index 06a4fd280..000000000 --- a/customizer/build-template.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "modules": [ - "accordion", - "tabs", - "button" - ], - "variables": { - "global-text-direction": "true", - "primary-color": "dodgerblue" - } -} diff --git a/customizer/complete.json b/customizer/complete.json new file mode 100644 index 000000000..89f342359 --- /dev/null +++ b/customizer/complete.json @@ -0,0 +1,40 @@ +{ + "modules": [ + "grid", + "typography", + "button", + "forms", + "accordion", + "accordion_menu", + "badge", + "breadcrumbs", + "button_group", + "callout", + "close_button", + "menu", + "menu_icon", + "drilldown", + "dropdown", + "dropdown_menu", + "flex_video", + "label", + "media_object", + "off_canvas", + "orbi", + "pagination", + "progress_bar", + "slider", + "sticky", + "reveal", + "switch", + "table", + "tabs", + "thumbnail", + "title_bar", + "tooltip", + "top_bar", + "visibility", + "float" + ], + "variables": {} +} diff --git a/customizer/essential.json b/customizer/essential.json new file mode 100644 index 000000000..7a90fca5f --- /dev/null +++ b/customizer/essential.json @@ -0,0 +1,9 @@ +{ + "modules": [ + "typography", + "grid", + "buttons", + "reveal" + ], + "variables": {} +} diff --git a/customizer/lib/js.js b/customizer/lib/js.js index d8546194b..f10b0d36a 100644 --- a/customizer/lib/js.js +++ b/customizer/lib/js.js @@ -1,3 +1,4 @@ +var empty = require('is-empty-object'); var unique = require('array-uniq'); /** @@ -11,6 +12,10 @@ module.exports = function(config, modules) { var utils = []; var libraries = []; + if (empty(modules)) { + modules = Object.keys(config); + } + for (var i in modules) { var name = modules[i]; diff --git a/customizer/lib/sass.js b/customizer/lib/sass.js index 69d6faf0a..b93b7c533 100644 --- a/customizer/lib/sass.js +++ b/customizer/lib/sass.js @@ -1,3 +1,4 @@ +var empty = require('is-empty-object'); var format = require('util').format; var multiline = require('multiline'); @@ -31,6 +32,10 @@ module.exports = function(config, modules, variables) { var variableList = []; var exportList = ['@include foundation-global-styles;']; + if (empty(modules)) { + modules = Object.keys(config); + } + // Create variable overrides code for (var i in variables) { var name = i.replace('_', '-'); diff --git a/package.json b/package.json index 13804b3eb..df1e97839 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "gulp-sourcemaps": "^1.6.0", "gulp-uglify": "^1.1.0", "inquirer": "^0.11.4", + "is-empty-object": "^1.1.1", "js-yaml": "^3.5.4", "mocha": "^2.3.3", "mocha-phantomjs": "^4.0.2",