From 0b8a771e7863c89692d0dc1e03a517db1ae321c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Denton?= Date: Mon, 13 Jan 2020 14:47:37 -0500 Subject: [PATCH] feat: Add suggested bolt.rc file for external builds --- .bolt-release/.boltrc.suggested.js | 65 ++++++++++++++++++++++ .bolt-release/README.md | 1 + docs-site/.boltrc.js | 86 +++++++----------------------- 3 files changed, 84 insertions(+), 68 deletions(-) create mode 100644 .bolt-release/.boltrc.suggested.js create mode 100644 .bolt-release/README.md diff --git a/.bolt-release/.boltrc.suggested.js b/.bolt-release/.boltrc.suggested.js new file mode 100644 index 0000000000..a8a7096fe4 --- /dev/null +++ b/.bolt-release/.boltrc.suggested.js @@ -0,0 +1,65 @@ +module.exports = { + components: { + global: [ + '@bolt/components-accordion', + '@bolt/components-action-blocks', + '@bolt/components-animate', + '@bolt/components-background-shapes', + '@bolt/components-background', + '@bolt/components-band', + '@bolt/components-block-list', + '@bolt/components-blockquote', + '@bolt/components-breadcrumb', + '@bolt/components-button-group', + '@bolt/components-button', + '@bolt/components-card', + '@bolt/components-card-replacement', + '@bolt/components-carousel', + '@bolt/components-chip-list', + '@bolt/components-chip', + '@bolt/components-code-snippet', + '@bolt/components-copy-to-clipboard', + '@bolt/components-device-viewer', + '@bolt/components-dropdown', + '@bolt/components-editor', + '@bolt/components-figure', + '@bolt/components-form', + '@bolt/components-grid', + '@bolt/components-headline', + '@bolt/components-icon', + '@bolt/components-image', + '@bolt/components-link', + '@bolt/components-list', + '@bolt/components-logo', + '@bolt/components-modal', + '@bolt/components-nav-indicator', + '@bolt/components-nav-priority', + '@bolt/components-navbar', + '@bolt/components-navlink', + '@bolt/components-ol', + '@bolt/components-pagination', + '@bolt/components-placeholder', + '@bolt/components-search-filter', + '@bolt/components-share', + '@bolt/components-site', + '@bolt/components-smooth-scroll', + '@bolt/components-stack', + '@bolt/components-sticky', + '@bolt/components-table', + '@bolt/components-tabs', + '@bolt/components-teaser', + '@bolt/components-text', + '@bolt/components-tooltip', + '@bolt/components-trigger', + '@bolt/components-typeahead', + '@bolt/components-ul', + '@bolt/components-video', + '@bolt/global', + ], + individual: [ + '@bolt/components-critical-fonts', + '@bolt/components-critical-css', + '@bolt/components-critical-css-vars', + ], + }, +}; diff --git a/.bolt-release/README.md b/.bolt-release/README.md new file mode 100644 index 0000000000..cd7ead49a4 --- /dev/null +++ b/.bolt-release/README.md @@ -0,0 +1 @@ +Files in this directory serve as a starting point for pre-built Bolt releases. diff --git a/docs-site/.boltrc.js b/docs-site/.boltrc.js index 0a820aeebd..8166ce2143 100644 --- a/docs-site/.boltrc.js +++ b/docs-site/.boltrc.js @@ -1,8 +1,10 @@ const path = require('path'); const resolve = require('resolve'); const argv = require('yargs').argv; +const deepmerge = require('deepmerge'); +const baseConfig = require('../.bolt-release/.boltrc.suggested.js'); -const config = { +const config = deepmerge(baseConfig, { // array of languages to compile the design system. note, these are ignored when the --i18n flag is set to false // Note: if lang is defined, the first item is currently the one used by default in the Pattern Lab build, pending further iterations on this! // lang: ['en', 'ja'], @@ -75,74 +77,26 @@ const config = { components: { global: [ - // helper components that are only used internally - '@bolt/shadow-toggle', - '@bolt/theme-switcher', + /* IMPORTANT: Do NOT list components here that are intended to be used + * outside of the docs site-- those should instead be pulled in through + * baseConfig. Use this only for internal components. + */ - '@bolt/components-radio-switch', - '@bolt/components-carousel', - '@bolt/global', - '@bolt/animations', - '@bolt/components-animate', - '@bolt/docs-search', - '@bolt/components-typeahead', - // '@bolt/schema-form', // Component Explorer being temporarily disabled until we've migrated our Twig Rendering Service to Now.sh v2 + // helper components that are only used internally '@bolt/analytics-autolink', '@bolt/analytics-autotrack', - '@bolt/components-placeholder', - '@bolt/components-accordion', - '@bolt/components-action-blocks', '@bolt/components-banner', - '@bolt/components-dropdown', - '@bolt/components-background', - '@bolt/components-background-shapes', - '@bolt/components-band', - '@bolt/components-block-list', - '@bolt/components-blockquote', - '@bolt/components-breadcrumb', - '@bolt/components-button', - '@bolt/components-button-group', - '@bolt/components-card', - '@bolt/components-card-replacement', - '@bolt/components-chip', - '@bolt/components-chip-list', - '@bolt/components-code-snippet', - '@bolt/components-copy-to-clipboard', - '@bolt/components-device-viewer', - '@bolt/components-figure', - '@bolt/components-form', - '@bolt/components-headline', - '@bolt/components-icon', - '@bolt/components-image', - '@bolt/components-link', - '@bolt/components-list', - '@bolt/components-modal', - '@bolt/components-nav-indicator', - '@bolt/components-nav-priority', - '@bolt/components-navbar', - '@bolt/components-navlink', - '@bolt/components-logo', + '@bolt/components-radio-switch', '@bolt/components-page-footer', '@bolt/components-page-header', - '@bolt/components-pagination', - '@bolt/components-share', - '@bolt/components-search-filter', - '@bolt/components-site', - '@bolt/components-smooth-scroll', - '@bolt/components-sticky', - '@bolt/components-stack', - '@bolt/components-table', - '@bolt/components-tabs', - '@bolt/components-teaser', - '@bolt/components-text', - '@bolt/components-tooltip', - '@bolt/components-trigger', - '@bolt/components-ul', - '@bolt/components-ol', - '@bolt/components-video', - '@bolt/components-grid', + '@bolt/docs-search', + // '@bolt/schema-form', // Component Explorer being temporarily disabled until we've migrated our Twig Rendering Service to Now.sh v2 + '@bolt/shadow-toggle', + '@bolt/theme-switcher', + + // Components that are excluded from the base release build. '@bolt/micro-journeys', - '@bolt/components-editor', + /** * note: resolving these paths isn't typically required when * the .boltrc config is run through the bolt CLI tool (ie. @@ -156,11 +110,7 @@ const config = { resolve.sync('./src/index.scss'), resolve.sync('./src/index.js'), ], - individual: [ - '@bolt/components-critical-fonts', - '@bolt/components-critical-css', - '@bolt/components-critical-css-vars', - ], + individual: [], }, copy: [ { @@ -200,6 +150,6 @@ const config = { functions: ['addBoltCoreExtensions', 'addBoltExtraExtensions'], }, ], -}; +}); module.exports = config;