Clone this repo:
  1. 0ae6897 CI: fix the branch (#10) by Kevin Moore · 3 months ago main
  2. 6385372 Only run the golden tests on the vm (#9) by Kevin Moore · 3 months ago
  3. 71db634 Drop unneeded dependency on pkg:pedantic (#8) by Kevin Moore · 3 months ago
  4. 6f66114 Fix repo location (#6) by Michael Thomsen · 4 months ago
  5. 151acb4 Bump to version 2.0.1 (#5) by Sarah Zakarias · 4 months ago

Yaml Editor

A library for YAML manipulation while preserving comments.

Usage

A simple usage example:

import 'package:yaml_edit/yaml_edit.dart';

void main() {
  final yamlEditor = YamlEditor('{YAML: YAML}');
  yamlEditor.assign(['YAML'], "YAML Ain't Markup Language");
  print(yamlEditor);
  // Expected output:
  // {YAML: YAML Ain't Markup Language}
}

Testing

Testing is done in two strategies: Unit testing (/test/editor_test.dart) and Golden testing (/test/golden_test.dart). More information on Golden testing and the input/output format can be found at /test/testdata/README.md.

These tests are automatically run with pub run test.

Limitations

  1. Users are not allowed to define tags in the modifications.
  2. Map keys will always be added in the flow style.