Closed Schwusch closed 2 years ago
These are exported from package:yaml
, see:
Feel free to file a PR improving the documentation.
Considering how I did not figure this out myself, I'd like to propose exporting package:yaml/yaml.dart
in yaml_edit.dart
.
Either that, or exporting just the classes yaml_edit
require but not provides itself, like ScalarStyle
.
Requiring the user to know the underlying implementation and take further action than to just import yaml_edit
is less user friendly.
I added the package:yaml/yaml.dart
export to yaml_edit.dart
, and it works fine. Even when adding package:yaml
as a dependency and importing it in the consuming code.
Just glancing quickly at the yaml_edit
source code, I did not even realize that yaml_edit
was dependent on yaml
.
The resulting code in yaml_edit.dart
would then become:
/// lot's of comments
library yaml_edit;
export 'package:yaml/yaml.dart'; // new export
export 'src/editor.dart';
export 'src/source_edit.dart';
export 'src/wrap.dart' show wrapAsYamlNode;
We do this in aws_client to improve the developer experience.
Right now it's a little hard to specify
wrapAsYamlNode
arguments likescalarStyle
andcollectionStyle
, since they're not exported.