jinja 0.4.0-dev.51
jinja: ^0.4.0-dev.51 copied to clipboard
Jinja2 template engine for Dart. Variables, expressions, control structures and template inheritance.
0.4.0-dev.51 #
- minimal SDK version: 2.17.0
- added:
PassArgument
,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
methodlistTemplates
methodparse
methodscan
method
Template
Template({path, lineCommentPrefix, lineStatementPrefix, newLine, modifiers, templates})
constructor argumentsgenerate
method
formatPath
function to normalize template pathsFileSystemLoader.findFile
method- exceptions are public now:
TemplateError
TemplateSyntaxError
TemplateAssertionError
TemplateNotFound
TemplatesNotFound
TemplateRuntimeError
- statements:
do
with
- filters:
dictsort
replace
reverse
safe
slice
striptags
truncate
wordcount
wordwrap
item
- changed:
FieldGetter
typedef renamed toAttributeGetter
mapping
test renamed tomap
default
filter compare values withnull
defined
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({path})
constructor argument is nullable now- 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({bool autoReload})
constructor argumentautoReload
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