jael_preprocessor

Last updated:

0 purchases

jael_preprocessor Image
jael_preprocessor Images
Add to Cart

Description:

jael preprocessor

jael_preprocessor #


A pre-processor for resolving blocks and includes within
Jael templates.
Installation #
In your pubspec.yaml:
dependencies:
jael_prepreprocessor: ^1.0.0-alpha
copied to clipboard
Usage #
It is unlikely that you will directly use this package, as it is
more of an implementation detail than a requirement. However, it
is responsible for handling include and block directives
(template inheritance), so you are a package maintainer and want
to support Jael, read on.
To keep things simple, just use the resolve function, which will
take care of inheritance for you.
import 'package:jael_preprocessor/jael_preprocessor.dart' as jael;

myFunction() async {
var doc = await parseTemplateSomehow();
var resolved = await jael.resolve(doc, dir, onError: (e) => doSomething());
}
copied to clipboard
You may occasionally need to manually patch in functionality that is not
available through the official Jael packages. To achieve this, simply
provide an Iterable of Patcher functions:
myOtherFunction(jael.Document doc) {
return jael.resolve(doc, dir, onError: errorHandler, patch: [
syntactic(),
sugar(),
etc(),
]);
}
copied to clipboard
This package uses package:file, rather than dart:io.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.