diff --git a/CHANGELOG.md b/CHANGELOG.md index 0223de1..3a8cf1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -- ... +### Changed +- Enabled the `yarn-add` gemspec metadata so Bridgetown sites that install the gem auto-add the `bridgetown-stoa` npm dependency. Matches the idiomatic pattern from `bridgetown-quick-search`. (`yarn-add` and `npm_add` are synonyms inside Bridgetown's plugin manager — the gemspec template's commented `npm_add` is the older name; the ecosystem has standardized on `yarn-add`.) +- Excluded `frontend/` from the gem's `files` glob. The Tailwind partial belongs in the npm companion only; shipping it in the gem too was duplicate distribution. +- Test fixture initializer now passes `require_gem: false` to `init :"bridgetown-stoa"` so Bridgetown's plugin manager doesn't run `install_npm_dependencies` during the test suite (which would inject a self-referencing dep into the gem's own `package.json`). The gem is already loaded by `test/helper.rb`, so the re-require was redundant anyway. ## [0.2.0] - 2026-05-22 diff --git a/bridgetown-stoa.gemspec b/bridgetown-stoa.gemspec index a7871ed..ff1bb8a 100644 --- a/bridgetown-stoa.gemspec +++ b/bridgetown-stoa.gemspec @@ -11,15 +11,12 @@ Gem::Specification.new do |spec| spec.homepage = "https://github.com/Guided-Rails/bridgetown-stoa" spec.license = "MIT" - spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r!^(test|script|spec|features)/!) } + spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r!^(test|script|spec|features|frontend)/!) } spec.test_files = spec.files.grep(%r!^test/!) spec.require_paths = ["lib"] - # TODO: enable the `npm_add` metadata below once the npm companion is - # published. While the package is unpublished, Bridgetown's init-time - # registry lookup 404s loudly during every test run. - # spec.metadata = { - # "npm_add" => "bridgetown-stoa@#{BridgetownStoa::VERSION}", - # } + spec.metadata = { + "yarn-add" => "bridgetown-stoa@#{BridgetownStoa::VERSION}", + } spec.required_ruby_version = ">= 3.2" diff --git a/test/fixtures/config/initializers.rb b/test/fixtures/config/initializers.rb index cf08a5d..8110ad2 100644 --- a/test/fixtures/config/initializers.rb +++ b/test/fixtures/config/initializers.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true Bridgetown.configure do |config| - init :"bridgetown-stoa" + init :"bridgetown-stoa", require_gem: false end