Closed akarzim closed 1 year ago
@akarzim I would prefer "Option 1: mandatory initializer declaration with a block". Just because your plugin currently doesn't require any init configuration now doesn't mean it won't in the future, and I think keeping the convention that it's mandatory is good for the ecosystem. Thanks.
I have recently created a converter plugin for Bridgetown without any configuration. Due to the lack of a call to
Bridgetown.initializer
, this log appears in development environment:Bridgetown Version: 1.2.0
To Reproduce
bin/bridgetown apply https://github.com/akarzim/bridgetown_markdown_lazylinks
bin/bridgetown start
.Current behavior
The
bin/bridgetown start
logs complain about the lack of a plugin initializer.Expected behavior
If the plugin does not declare an initializer, Bridgetown should not try to call one.
Screenshots
Computing environment (please complete the following information):
Proposals
Option 1: mandatory initializer declaration with a block
Option 2: mandatory initializer declaration but make the block optional
But it makes no sense to initialise a plugin without initialising anything. And this would lead to a crash when calling the
bin/bridgetown plugins list
command:Option 3: optional initializer declaration
This requires to fix
bin/bridgetown plugins list
command too:I'm not sure which option would suit you best. Let me know and I'll link a PR to this issue!