diff --git a/CHANGELOG b/CHANGELOG index f87d84b..5e687da 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -21,4 +21,6 @@ ## 0.9.42 +- Bug Fixes in comptaibility with the new depency inversion principle of the configuration logic. - Added support for json configuration in addition of the yaml configuration, with the default one being yaml, the user can specify it with the `--json`, `--yaml`... +- Added syntax highlighting for the configuration files. diff --git a/bin/langsync.exe b/bin/langsync.exe index e180b7e..16b2073 100644 Binary files a/bin/langsync.exe and b/bin/langsync.exe differ diff --git a/lib/src/commands/start_command/start_command.dart b/lib/src/commands/start_command/start_command.dart index dde5642..936a95f 100644 --- a/lib/src/commands/start_command/start_command.dart +++ b/lib/src/commands/start_command/start_command.dart @@ -5,7 +5,6 @@ import 'dart:io'; import 'package:args/command_runner.dart'; import 'package:hive/hive.dart'; import 'package:langsync/src/etc/controllers/config_file.dart'; -import 'package:langsync/src/etc/controllers/yaml.dart'; import 'package:langsync/src/etc/extensions.dart'; import 'package:langsync/src/etc/models/lang_output.dart'; import 'package:langsync/src/etc/models/result_locale.dart'; diff --git a/lib/src/etc/models/config.dart b/lib/src/etc/models/config.dart index 8b9659f..5ce57d3 100644 --- a/lib/src/etc/models/config.dart +++ b/lib/src/etc/models/config.dart @@ -12,9 +12,11 @@ class LangSyncConfig extends Equatable { factory LangSyncConfig.fromMap(Map map) { final langsyncMapField = map['langsync'] as Map; - final target = (langsyncMapField['target'] as YamlList) - .nodes - .map((e) => e.value as String); + final targetField = langsyncMapField['target']; + + final target = targetField is YamlList + ? (targetField as YamlList).nodes.map((e) => e.value as String) + : (targetField as List).map((e) => e as String); return LangSyncConfig( sourceFile: langsyncMapField['source'] as String,