dartboard_resume/bin/dartboard_resume.dart

22 lines
696 B
Dart
Raw Normal View History

import 'dart:async';
2024-09-10 15:09:15 -06:00
import 'dart:developer' as dev;
import 'dart:io';
2024-09-10 15:09:15 -06:00
import 'package:dartboard_resume/dartboard_runner.dart';
import 'package:hotreloader/hotreloader.dart';
import 'package:logging/logging.dart' as logging;
Future<void> main(List<String> arguments) async {
logging.hierarchicalLoggingEnabled = true;
HotReloader.logLevel = logging.Level.INFO;
2024-09-10 15:09:15 -06:00
HotReloader? reloader;
if ((await dev.Service.getInfo()).serverUri != null) {
reloader = await HotReloader.create();
} else {
2024-09-10 15:09:15 -06:00
stdout.writeln(
"Dartboard can hot reload if run with dart's VM service.\n`dart run --enable-vm-service bin/dartboard_resume.dart`",
);
}
dartboardRun(reloader, arguments);
}