Skip to content

Commit

Permalink
feat: Add suggested bolt.rc file for external builds
Browse files Browse the repository at this point in the history
  • Loading branch information
remydenton committed Jan 13, 2020
1 parent d0b457b commit 0b8a771
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 68 deletions.
65 changes: 65 additions & 0 deletions .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',
],
},
};
1 change: 1 addition & 0 deletions .bolt-release/README.md
@@ -0,0 +1 @@
Files in this directory serve as a starting point for pre-built Bolt releases.
86 changes: 18 additions & 68 deletions 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'],
Expand Down Expand Up @@ -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.
Expand All @@ -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: [
{
Expand Down Expand Up @@ -200,6 +150,6 @@ const config = {
functions: ['addBoltCoreExtensions', 'addBoltExtraExtensions'],
},
],
};
});

module.exports = config;

0 comments on commit 0b8a771

Please sign in to comment.