Skip to content

Commit

Permalink
Use cli_launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsenko committed Mar 14, 2024
1 parent 520b4ad commit c26e7d7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
10 changes: 8 additions & 2 deletions packages/realm_dart/dev/bin/dev.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
// SPDX-License-Identifier: Apache-2.0

import 'package:dev/dev.dart' as dev;

void main(List<String> arguments) => dev.main(arguments);
import 'package:cli_launcher/cli_launcher.dart';
Future<void> main(List<String> arguments) async => launchExecutable(
arguments,
LaunchConfig(
name: ExecutableName('dev'),
entrypoint: dev.main,
),
);
3 changes: 2 additions & 1 deletion packages/realm_dart/dev/lib/dev.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
import 'dart:io' as io;

import 'package:args/command_runner.dart';
import 'package:cli_launcher/cli_launcher.dart';

import 'src/build.dart';

Future<void> main(List<String> arguments) async {
Future<void> main(List<String> arguments, LaunchContext launchContext) async {
final runner = CommandRunner<int>('dev', 'Helper tool for building realm_dart')
..addCommand(BuildNativeCommand())
..addCommand(PossibleTargets())
Expand Down
1 change: 1 addition & 0 deletions packages/realm_dart/dev/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ environment:
dependencies:
args: ^2.4.2
async: ^2.11.0
cli_launcher: ^0.3.1
collection: ^1.18.0
mason_logger: ^0.2.12

Expand Down

0 comments on commit c26e7d7

Please sign in to comment.