jinja 0.4.0-dev.64
jinja: ^0.4.0-dev.64 copied to clipboard
Jinja2 template engine for Dart. Variables, expressions, control structures and template inheritance.
0.4.0-dev.64 #
- minimal SDK version: 2.18.0
- added:
passContext
andpassEnvironment
...print
to globals:{{ do print(name) }}
Environment
Environment({lineCommentPrefix, lineStatementPrefix, newLine, autoReload, modifiers, templates})
constructor argumentsautoReload
fieldlexer
fieldlineCommentPrefix
fieldlineStatementPrefix
fieldloader
fieldmodifiers
fieldnewLine
fieldlex
methodscan
methodparse
method
Template
Template({path, lineCommentPrefix, lineStatementPrefix, newLine, modifiers, templates})
constructor argumentsrenderTo
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
- changed:
FieldGetter
typedef renamed toAttributeGetter
default
filter compare values withnull
, no boolean argumentdefined
andundefined
tests compare values withnull
Environment
Environment({getField})
constructor argument renamed togetAttribute
getField
field renamed togetAttribute
Template
Template({parent})
constructor argument renamed toenvironment
and doesn't copy the environmentrenderMap
method renamed torender
Loader.listSources
method renamed tolistTemplates
MapLoader.mapping
field renamed tosources
FileSystemLoader
FileSystemLoader({paths})
argument now non-nullable, defaults to['templates']
- moved to
package:jinja/loaders.dart
library
package:jinja/get_field.dart
library renamed topackage:jinja/reflection.dart
getField
function renamed togetAttribute
- removed:
Undefined
type andmissing
objectEnvironment.undefined
methodTemplate.render
methodFileSystemLoader
:FileSystemLoader({path, autoReload})
argumentsautoReload
fielddirectory
field
- slices and negative indexes
- conditional and variable
extends
statement variants - choice, ignore missing and variable
include
statement variants
- internal changes
- work in progress