22 lines
696 B
Dart
22 lines
696 B
Dart
import 'dart:async';
|
|
import 'dart:developer' as dev;
|
|
import 'dart:io';
|
|
|
|
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;
|
|
HotReloader? reloader;
|
|
if ((await dev.Service.getInfo()).serverUri != null) {
|
|
reloader = await HotReloader.create();
|
|
} else {
|
|
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);
|
|
}
|