jinja 0.5.0-dev.25 copy "jinja: ^0.5.0-dev.25" to clipboard
jinja: ^0.5.0-dev.25 copied to clipboard

Jinja2 template engine for Dart. Variables, expressions, control structures and template inheritance.

0.5.0-dev.25 #

  • minimal SDK version: 3.0.0.
  • internal changes.
  • added:
    • Template:
      • Template.fromNode(Environment environment, {String? path, required Node body}) constructor
    • statements:
      • macro:
        • varargs
        • kwargs
        • caller
  • changed:
    • Environment:
      • Environment({modifiers}) from List<NodeVisitor> to List<Node Function(Node)>
      • Environment.modifiers from List<NodeVisitor> to List<Node Function(Node)>
      • Environment.scan(...) from List<Node> to Node
      • Environment.parse(...) from List<Node> to Node
    • Template:
      • Template({modifiers}) from List<NodeVisitor> to List<Node Function(Node)>
  • removed:
    • Template:
      • Template.fromNodes(Environment environment, List<Node> nodes, {String? path}) constructor

0.4.2 #

  • internal changes.

0.4.1 #

  • update links.

0.4.0 #

  • minimal SDK version: 2.18.0.
  • added:
    • passContext and passEnvironment functions
    • print to globals {{ do print(name) }}
    • Environment
      • Environment({lineCommentPrefix, lineStatementPrefix, newLine, autoReload, modifiers, templates}) constructor arguments
      • autoReload field
      • lexer field
      • lineCommentPrefix field
      • lineStatementPrefix field
      • loader field
      • modifiers field
      • newLine field
      • lex method
      • scan method
      • parse method
    • Template
      • Template({path, lineCommentPrefix, lineStatementPrefix, newLine, modifiers, templates}) constructor arguments
      • renderTo method
    • exceptions are public now:
      • TemplateError
      • TemplateSyntaxError
      • TemplateAssertionError
      • TemplateNotFound
      • TemplatesNotFound
      • TemplateRuntimeError
      • FilterArgumentError
    • statements:
      • do
      • with
    • filters:
      • dictsort
      • replace
      • reverse
      • safe
      • slice
      • striptags
      • truncate
      • wordcount
      • wordwrap
      • item
      • map
      • tojson
    • test:
      • filter
      • test
  • changed:
    • FieldGetter typedef renamed to AttributeGetter
    • default filter compare values with null, no boolean argument
    • defined and undefined tests compare values with null
    • Environment
      • Environment({getField}) constructor argument renamed to getAttribute
      • getField field renamed to getAttribute
    • Template
      • Template({parent}) constructor argument renamed to environment and doesn't copy the environment
      • renderMap method renamed to render
    • Loader.listSources method renamed to listTemplates
    • MapLoader.mapping field renamed to sources
    • FileSystemLoader
      • FileSystemLoader({paths}) argument now non-nullable, defaults to ['templates']
      • moved to package:jinja/loaders.dart library
    • package:jinja/get_field.dart library renamed to package:jinja/reflection.dart
    • getField function renamed to getAttribute
  • removed:
    • Undefined type and missing object
    • Environment.undefined method
    • Template.render method
    • FileSystemLoader:
      • FileSystemLoader({path, autoReload}) arguments
      • autoReload field
      • directory field
    • slices and negative indexes
    • conditional and variable extends statement variants
    • choice, ignore missing and variable include statement variants
  • internal changes
  • work in progress
32
likes
0
pub points
86%
popularity

Publisher

unverified uploader

Jinja2 template engine for Dart. Variables, expressions, control structures and template inheritance.

Repository (GitHub)
View/report issues

Funding

Consider supporting this project:

www.buymeacoffee.com

License

unknown (LICENSE)

Dependencies

html_unescape, meta, path, string_scanner, textwrap

More

Packages that depend on jinja