platform/packages/jael/jael_preprocessor/example/main.dart

16 lines
435 B
Dart
Raw Normal View History

2018-04-03 05:04:34 +00:00
import 'dart:async';
import 'package:file/file.dart';
2021-05-15 10:28:09 +00:00
import 'package:jael3/jael3.dart' as jael;
import 'package:jael3_preprocessor/jael3_preprocessor.dart' as jael;
2018-04-03 05:04:34 +00:00
2021-04-30 07:08:54 +00:00
Future<jael.Document?> process(
2018-04-03 05:04:34 +00:00
jael.Document doc, Directory dir, errorHandler(jael.JaelError e)) {
return jael.resolve(doc, dir, onError: errorHandler, patch: [
(doc, dir, onError) {
2021-04-30 07:08:54 +00:00
print(doc!.root.children.length);
2018-04-03 05:04:34 +00:00
return doc;
},
]);
}