twig_dart_preprocessor 3.0.1 copy "twig_dart_preprocessor: ^3.0.1" to clipboard
twig_dart_preprocessor: ^3.0.1 copied to clipboard

A pre-processor for resolving blocks and includes within Twig templates.

example/main.dart

import 'dart:async';

import 'package:file/file.dart';
import 'package:twig_dart/twig_dart.dart' as twig;
import 'package:twig_dart_preprocessor/twig_dart_preprocessor.dart' as twig;

Future<twig.Document?> process(twig.Document doc, Directory dir, errorHandler(e)) {
  return twig.resolve(doc, dir, onError: errorHandler, patch: [
    (doc, dir, onError) {
      print(doc!.root.children.length);
      return doc;
    },
  ]);
}
2
likes
110
pub points
0%
popularity

Publisher

verified publishergalileodart.com

A pre-processor for resolving blocks and includes within Twig templates.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

collection, essential_symbol_table, file, twig_dart

More

Packages that depend on twig_dart_preprocessor