bridgetownrb / bridgetown-view-component

Add support for GitHub's ViewComponent library to your Bridgetown sites.
MIT License
10 stars 1 forks source link

Support for Bridgetown v1.2.0 #4

Closed joemasilotti closed 1 year ago

joemasilotti commented 1 year ago

When adding this gem to a Bridgetown v1.2.0 project I get a bunch of deprecation warnings in the console.

[Bridgetown]        Deprecation: The Bridgetown::ViewComponent plugin should switch from using `new_source_manifest' to the `source_manifest` initializer method
[Bridgetown]        Deprecation: The Bridgetown::ViewComponent plugin should switch from using `add_source_manifest' to the `source_manifest` initializer method
[Bridgetown]       Initializing: The `bridgetown-view-component' initializer could not be found
[Bridgetown]        Deprecation: The Bridgetown::ViewComponent plugin should switch from using `new_source_manifest' to the `source_manifest` initializer method
[Bridgetown]        Deprecation: The Bridgetown::ViewComponent plugin should switch from using `add_source_manifest' to the `source_manifest` initializer method
[Bridgetown]       Initializing: The `bridgetown-view-component' initializer could not be found

Relevant code:

# Gemfile
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

gem "bridgetown", "1.2.0.beta4"

gem "bridgetown-view-component"
gem "view_component", "< 2.75"

group :development do
  gem "puma", "~> 5.6"
end
# config/initializers.rb
Bridgetown.configure do |config|
  permalink "pretty"
  template_engine "erb"

  init :"bridgetown-view-component"
end
ZilvinasKucinskas commented 1 year ago

Solved via https://github.com/bridgetownrb/bridgetown-view-component/commit/39d46b7ab4f23ccca065d3f4e742938ae7a370d1 and released as v2.0.0 🎉