platform/helpers/print_melos_commands.dart
2024-10-27 15:17:26 -07:00

23 lines
656 B
Dart

import 'dart:io';
import 'package:yaml/yaml.dart';
void main() {
final file = File('melos.yaml');
final yamlString = file.readAsStringSync();
final yamlMap = loadYaml(yamlString);
final scripts = yamlMap['scripts'] as YamlMap;
print('Available Protevus Platform commands:');
print('=====================================\n');
scripts.forEach((key, value) {
final description =
value['description'] as String? ?? 'No description provided';
print('${key.padRight(20)} $description');
});
print('\nUsage: melos run <command>');
print(
'For more details on a specific command, use: melos run <command> --help');
}