Skip to content

Commit

Permalink
fix: pass org_name to the plugin template (#777)
Browse files Browse the repository at this point in the history
* fix: pass `org_name` to the plugin template

* test
  • Loading branch information
renancaraujo authored Sep 14, 2023
1 parent 07a11ce commit 9898256
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/commands/create/commands/flutter_plugin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:very_good_cli/src/commands/create/templates/templates.dart';
/// {@template very_good_create_flutter_plugin_command}
/// A [CreateSubCommand] for creating Flutter plugins.
/// {@endtemplate}
class CreateFlutterPlugin extends CreateSubCommand with Publishable {
class CreateFlutterPlugin extends CreateSubCommand with Publishable, OrgName {
/// {@macro very_good_create_flutter_plugin_command}
CreateFlutterPlugin({
required super.logger,
Expand Down
4 changes: 4 additions & 0 deletions test/src/commands/create/commands/flutter_plugin_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Usage: very_good create flutter_plugin <project-name> [arguments]
-o, --output-directory The desired output directory when creating a new project.
--description The description for this new project.
(defaults to "A Very Good Project created by Very Good CLI.")
--org-name The organization for this new project.
(defaults to "com.example.verygoodcore")
--publishable Whether the generated project is intended to be published.
--platforms The platforms supported by the plugin. By default, all platforms are enabled. Example: --platforms=android,ios
Expand Down Expand Up @@ -187,6 +189,7 @@ void main() {
vars: <String, dynamic>{
'project_name': 'my_plugin',
'description': '',
'org_name': 'com.example.verygoodcore',
'publishable': false,
'platforms': ['android', 'ios', 'windows'],
},
Expand All @@ -199,6 +202,7 @@ void main() {
vars: <String, dynamic>{
'project_name': 'my_plugin',
'description': '',
'org_name': 'com.example.verygoodcore',
'publishable': false,
'platforms': ['android', 'ios', 'windows'],
},
Expand Down

0 comments on commit 9898256

Please sign in to comment.