Skip to content

Commit

Permalink
Update dependencies and improve build process (#11)
Browse files Browse the repository at this point in the history
 * Update flame_lint to 0.2.0 (to fix deprecated option warning + more rules)
 * Bump other packages (mason, dartdoc)
 * Update build script to use mason from pubspec instead of requiring global mason_cli
 * Use newer mason to re-generate the binary files (should be no-op, just different format)
 * Support old versions of flame implicitly (before you HAD to pick last 3, now we show last 5 but you can pick any)
  • Loading branch information
luanpotter authored Feb 5, 2023
1 parent 1dbf982 commit fb5f1fa
Show file tree
Hide file tree
Showing 9 changed files with 291 additions and 263 deletions.
3 changes: 2 additions & 1 deletion lib/commands/create_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ Future<void> createCommand(ArgResults command) async {
interactive,
'flame-version',
'Which Flame version do you wish to use?',
flameVersions.versions.associateWith((e) => e),
flameVersions.visible.associateWith((e) => e),
defaultsTo: flameVersions.versions.first,
fullOptions: flameVersions.versions.associateWith((e) => e),
);

final extraPackageOptions = FlameVersionManager.singleton.versions.keys
Expand Down
5 changes: 4 additions & 1 deletion lib/flame_version_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,14 @@ enum Package {

class Versions {
final List<String> versions;

String get main => versions.first;
List<String> get visible => versions.take(5).toList();

const Versions(this.versions);

factory Versions.parse(List<Map<String, dynamic>> json) {
final versions = json.map((e) => e['version'] as String).toList().reversed;
return Versions(versions.take(3).toList());
return Versions(versions.toList());
}
}
46 changes: 2 additions & 44 deletions lib/templates/bricks/basics_bundle.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 2 additions & 44 deletions lib/templates/bricks/example_bundle.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fb5f1fa

Please sign in to comment.