platform/packages/jael/jael_preprocessor/example/main.dart
2021-05-18 20:12:47 +08:00

15 lines
444 B
Dart

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