Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pass org_name to the plugin template #777

Merged
merged 3 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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