platform/packages/jael/jael_preprocessor/example/main.dart
Tobe O edfd785dfe Add 'packages/jael/' from commit 'af168281d94cda98a8fd333618696e92f4e035c5'
git-subtree-dir: packages/jael
git-subtree-mainline: 834de0300f
git-subtree-split: af168281d9
2020-02-15 18:22:11 -05:00

15 lines
429 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;
},
]);
}