From 5514bfada1585a9dad6cb11d662ecb36e2a5f85d Mon Sep 17 00:00:00 2001 From: Jared White Date: Sun, 18 Jun 2023 10:03:40 -0700 Subject: [PATCH] Lit configuration bug fixes based on QA --- CHANGELOG.md | 4 ++++ .../lib/bridgetown-core/commands/esbuild/esbuild.config.js | 7 ++----- .../commands/esbuild/esbuild.defaults.js.erb | 6 +++--- bridgetown-core/lib/bridgetown-core/configurations/lit.rb | 6 +++--- bridgetown-core/lib/bridgetown-core/version.rb | 2 +- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e11db8baf..6337fe17b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## [1.3.0.beta3] - 2023-06-18 + +- Lit configuration bug fixes based on QA + ## [1.3.0.beta2] - 2023-06-18 - Declarative Shadow DOM integration [#763](https://github.com/bridgetownrb/bridgetown/pull/763) ([jaredcwhite](https://github.com/jaredcwhite)) diff --git a/bridgetown-core/lib/bridgetown-core/commands/esbuild/esbuild.config.js b/bridgetown-core/lib/bridgetown-core/commands/esbuild/esbuild.config.js index fe49bec74..842c855c6 100644 --- a/bridgetown-core/lib/bridgetown-core/commands/esbuild/esbuild.config.js +++ b/bridgetown-core/lib/bridgetown-core/commands/esbuild/esbuild.config.js @@ -1,8 +1,5 @@ const build = require("./config/esbuild.defaults.js") -// Update this if you need to configure a destination folder other than `output` -const outputFolder = "output" - // You can customize this as you wish, perhaps to add new esbuild plugins. // // ``` @@ -39,8 +36,8 @@ const esbuildOptions = { // add new plugins here... ], globOptions: { - excludeFilter: /\.(dsd|lit)\.(css|js)$/ + excludeFilter: /\.(dsd|lit)\.css$/ } } -build(outputFolder, esbuildOptions) +build(esbuildOptions) diff --git a/bridgetown-core/lib/bridgetown-core/commands/esbuild/esbuild.defaults.js.erb b/bridgetown-core/lib/bridgetown-core/commands/esbuild/esbuild.defaults.js.erb index 1826c2525..76d47a816 100644 --- a/bridgetown-core/lib/bridgetown-core/commands/esbuild/esbuild.defaults.js.erb +++ b/bridgetown-core/lib/bridgetown-core/commands/esbuild/esbuild.defaults.js.erb @@ -283,11 +283,11 @@ const bridgetownConfigured = (bridgetownConfig, outputFolder) => { // Load the PostCSS config from postcss.config.js or whatever else is a supported location/format const postcssrc = require("postcss-load-config") -module.exports = async (esbuildOptions) => { +module.exports = async (esbuildOptions, ...args) => { let outputFolder; if (typeof esbuildOptions === "string") { // legacy syntax where first argument is output folder - esbuildOptions = arguments[1] - outputFolder = arguments[0] + outputFolder = esbuildOptions + esbuildOptions = args[0] } const bridgetownConfig = bridgetownConfigured(esbuildOptions.bridgetownConfig, outputFolder) diff --git a/bridgetown-core/lib/bridgetown-core/configurations/lit.rb b/bridgetown-core/lib/bridgetown-core/configurations/lit.rb index 1fccd8e3b..02ad187bb 100644 --- a/bridgetown-core/lib/bridgetown-core/configurations/lit.rb +++ b/bridgetown-core/lib/bridgetown-core/configurations/lit.rb @@ -11,9 +11,9 @@ say_status :lit, "Installing Lit + SSR Plugin..." -add_gem "bridgetown-lit-renderer", version: "2.1.0.beta1" +add_gem "bridgetown-lit-renderer", version: "2.1.0.beta2" -run "yarn add lit esbuild-plugin-lit-css bridgetown-lit-renderer@2.1.0-beta1" +run "yarn add lit esbuild-plugin-lit-css bridgetown-lit-renderer@2.1.0-beta2" copy_file in_templates_dir("lit-ssr.config.js"), "config/lit-ssr.config.js" copy_file in_templates_dir("lit-components-entry.js"), "config/lit-components-entry.js" @@ -30,7 +30,7 @@ insert_into_file "esbuild.config.js", after: " plugins: [" do <<-JS - plugins: [...plugins], + ...plugins, JS end diff --git a/bridgetown-core/lib/bridgetown-core/version.rb b/bridgetown-core/lib/bridgetown-core/version.rb index 8634074d4..9eaf02cb5 100644 --- a/bridgetown-core/lib/bridgetown-core/version.rb +++ b/bridgetown-core/lib/bridgetown-core/version.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true module Bridgetown - VERSION = "1.3.0.beta2" + VERSION = "1.3.0.beta3" CODE_NAME = "Kelly Butte" end