change 0.3.0-dev.1 change: ^0.3.0-dev.1 copied to clipboard
A Changelog manipulation library. Read/modify/write your CHANGELOG.md. Inspired by keepachangelog.com.
import 'dart:io';
import 'package:change/change.dart';
/// This example shows how to parse a changelog.
/// Run it from the project root folder: `dart example/main.dart`
void main() {
final file = File('CHANGELOG.md');
final log = Changelog.parse(file.readAsStringSync());
final latest = log.history().last;
print('Changelog contains ${log.history().length} releases.');
print('The latest version is ${latest.version}');
print('released on ${latest.date}');
print('and containing ${latest.changes().length} change(s).');
}