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

refactor: moved packages get command to its own file #829

Merged
merged 3 commits into from
Oct 4, 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/commands.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export 'create/commands/commands.dart';
export 'create/create.dart';
export 'packages.dart';
export 'packages/packages.dart';
export 'test/test.dart';
export 'update.dart';
1 change: 1 addition & 0 deletions lib/src/commands/packages/commands/commands.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export 'get.dart';
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,6 @@ import 'package:path/path.dart' as path;
import 'package:universal_io/io.dart';
import 'package:very_good_cli/src/cli/cli.dart';

/// {@template packages_command}
/// `very_good packages` command for managing packages.
/// {@endtemplate}
class PackagesCommand extends Command<int> {
/// {@macro packages_command}
PackagesCommand({Logger? logger}) {
addSubcommand(PackagesGetCommand(logger: logger));
}

@override
String get description => 'Command for managing packages.';

@override
String get name => 'packages';
}

/// {@template packages_get_command}
/// `very_good packages get` command for installing packages.
/// {@endtemplate}
Expand Down
19 changes: 19 additions & 0 deletions lib/src/commands/packages/packages.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import 'package:args/command_runner.dart';
import 'package:mason/mason.dart';
import 'package:very_good_cli/src/commands/packages/commands/commands.dart';

/// {@template packages_command}
/// `very_good packages` command for managing packages.
/// {@endtemplate}
class PackagesCommand extends Command<int> {
/// {@macro packages_command}
PackagesCommand({Logger? logger}) {
addSubcommand(PackagesGetCommand(logger: logger));
}

@override
String get description => 'Command for managing packages.';

@override
String get name => 'packages';
}
Loading