platform/packages/jael/jael_preprocessor/example/main.dart
thomashii@dukefirehawk.com 750dd63309 Fixed jael_preprocessor tests
2021-04-30 15:08:54 +08:00

15 lines
431 B
Dart

import 'dart:async';
import 'package:file/file.dart';
import 'package:jael/jael.dart' as jael;
import 'package:jael_preprocessor/jael_preprocessor.dart' as jael;
Future<jael.Document?> process(
jael.Document doc, Directory dir, errorHandler(jael.JaelError e)) {
return jael.resolve(doc, dir, onError: errorHandler, patch: [
(doc, dir, onError) {
print(doc!.root.children.length);
return doc;
},
]);
}