jinja 0.6.0 copy "jinja: ^0.6.0" to clipboard
jinja: ^0.6.0 copied to clipboard

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

0.6.0 ( #

  • bump SDK version to 3.3.0.
  • update dependencies.
  • internal changes.
  • chrome platform tests.
  • added:
    • statements:
      • import
      • from
    • Template:
      • Template.fromNode({globals}) argument
      • globals field
  • restored:
    • conditional and variable extends statement variants
    • choice, ignore missing and variable include statement variants
  • changed:
    • Environment:
      • Environment.lex() return from List<Token> to Iterable<Token>
      • Environment.scan(tokens) argument type from List<Token> to Iterable<Token>
  • removed:
    • exceptions:
      • FilterArgumentError
    • *args and **kwargs support

0.5.0 #

  • minimal SDK version: 3.0.0.
  • internal changes.
  • added:
    • Template:
      • Template.fromNode(Environment environment, {String? path, required Node body}) constructor
    • statements:
      • macro
      • call
    • filters:
      • items
      • title
  • changed:
    • Environment:
      • Environment({modifiers}) argument type from List<NodeVisitor> to List<Node Function(Node)>
      • modifiers type from List<NodeVisitor> to List<Node Function(Node)>
      • scan(...) return type from List<Node> to Node
      • parse(...) return type from List<Node> to Node
    • Template:
      • Template({modifiers}) argument type from List<NodeVisitor> to List<Node Function(Node)>
    • filters:
      • truncate arguments are now positional
  • removed:
    • Template:
      • Template.fromNodes(...) constructor
    • statements:
      • autoescape
    • filters:
      • forceescape
      • safe
      • unsafe
    • tests:
      • escaped

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
31
likes
140
pub points
88%
popularity

Publisher

unverified uploader

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

Repository (GitHub)
View/report issues

Documentation

API reference

Funding

Consider supporting this project:

www.buymeacoffee.com

License

MIT (LICENSE)

Dependencies

html_unescape, meta, path, string_scanner, textwrap

More

Packages that depend on jinja