From 407360e1951bffc3c1ac419e19569edd48dd1975 Mon Sep 17 00:00:00 2001 From: Salem Ghoweri Date: Tue, 27 Aug 2019 07:07:27 -0400 Subject: [PATCH 1/5] test: test Drupal Lab build after configuring Sass Loader default output --- .../drupal-lab/web/themes/bolt-starter/package.json | 2 +- packages/build-tools/create-webpack-config.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/example-integrations/drupal-lab/web/themes/bolt-starter/package.json b/example-integrations/drupal-lab/web/themes/bolt-starter/package.json index fe55c0fb29..a350668334 100644 --- a/example-integrations/drupal-lab/web/themes/bolt-starter/package.json +++ b/example-integrations/drupal-lab/web/themes/bolt-starter/package.json @@ -18,7 +18,7 @@ "jest": "^24.8.0", "patch-package": "^6.1.2", "postinstall-postinstall": "^2.0.0", - "@bolt/build-tools": "latest", + "@bolt/build-tools": "file:../../../../../packages/build-tools", "@bolt/components-button": "latest", "@bolt/components-headline": "latest", "@bolt/components-icon": "latest", diff --git a/packages/build-tools/create-webpack-config.js b/packages/build-tools/create-webpack-config.js index 9f4753e95f..a5d2ecbb8c 100644 --- a/packages/build-tools/create-webpack-config.js +++ b/packages/build-tools/create-webpack-config.js @@ -233,6 +233,7 @@ async function createWebpackConfig(buildConfig) { functions: sassExportData, precision: 3, data: globalSassData.join('\n'), + outputStyle: 'compact' }, }, ]; From 72afb1bbaeab28408910000ba2a845c0473b0617 Mon Sep 17 00:00:00 2001 From: Salem Ghoweri Date: Tue, 27 Aug 2019 07:18:19 -0400 Subject: [PATCH 2/5] test: re-run build tool tests --- packages/build-tools/create-webpack-config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/build-tools/create-webpack-config.js b/packages/build-tools/create-webpack-config.js index a5d2ecbb8c..c1e0bdb22a 100644 --- a/packages/build-tools/create-webpack-config.js +++ b/packages/build-tools/create-webpack-config.js @@ -233,7 +233,7 @@ async function createWebpackConfig(buildConfig) { functions: sassExportData, precision: 3, data: globalSassData.join('\n'), - outputStyle: 'compact' + outputStyle: 'nested' }, }, ]; From 1b73dab9c5809b02207ceef013f716e436ce28e7 Mon Sep 17 00:00:00 2001 From: Salem Ghoweri Date: Tue, 27 Aug 2019 09:03:16 -0400 Subject: [PATCH 3/5] hotfix: update webpack Sass loader config to always output nested CSS to address a recent Sass Loader upstream change --- packages/build-tools/create-webpack-config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/build-tools/create-webpack-config.js b/packages/build-tools/create-webpack-config.js index c1e0bdb22a..7db9caa573 100644 --- a/packages/build-tools/create-webpack-config.js +++ b/packages/build-tools/create-webpack-config.js @@ -233,7 +233,7 @@ async function createWebpackConfig(buildConfig) { functions: sassExportData, precision: 3, data: globalSassData.join('\n'), - outputStyle: 'nested' + outputStyle: 'nested', }, }, ]; From 230e96d064af4a97a555e831f55b4f183570accf Mon Sep 17 00:00:00 2001 From: Salem Ghoweri Date: Tue, 27 Aug 2019 09:03:50 -0400 Subject: [PATCH 4/5] hotfix: update CLI to force i18n to be enabled by default for prod builds if otherwise undefined --- packages/build-tools/cli.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/build-tools/cli.js b/packages/build-tools/cli.js index 708f470d80..f78a91ea9b 100755 --- a/packages/build-tools/cli.js +++ b/packages/build-tools/cli.js @@ -122,8 +122,13 @@ if (program.configFile) { // automatically set enableSSR to true in prod mode and false in dev mode, unless manually set. config.enableSSR = false; + // automatically enable i18n in production builds if undefined config.i18n = - typeof options.i18n === 'undefined' ? !config.prod : options.i18n; + typeof options.i18n !== 'undefined' + ? options.i18n + : config.prod + ? true + : false; // If i18n is disabled, ignore and remove lang config settings if (config.lang && config.i18n === false) { From 49a12def09051de909d7da42099c8aef3df6f19f Mon Sep 17 00:00:00 2001 From: Salem Ghoweri Date: Tue, 27 Aug 2019 15:31:47 -0400 Subject: [PATCH 5/5] chore: revert build tool version change in Drupal Lab --- .../drupal-lab/web/themes/bolt-starter/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example-integrations/drupal-lab/web/themes/bolt-starter/package.json b/example-integrations/drupal-lab/web/themes/bolt-starter/package.json index a350668334..fe55c0fb29 100644 --- a/example-integrations/drupal-lab/web/themes/bolt-starter/package.json +++ b/example-integrations/drupal-lab/web/themes/bolt-starter/package.json @@ -18,7 +18,7 @@ "jest": "^24.8.0", "patch-package": "^6.1.2", "postinstall-postinstall": "^2.0.0", - "@bolt/build-tools": "file:../../../../../packages/build-tools", + "@bolt/build-tools": "latest", "@bolt/components-button": "latest", "@bolt/components-headline": "latest", "@bolt/components-icon": "latest",