jinja 0.6.1-dev.0
jinja: ^0.6.1-dev.0 copied to clipboard
Jinja2 template engine for Dart. Variables, expressions, control structures and template inheritance.
0.6.1-dev.0 (diff) #
- added:
UndefinedErrorexceptionUndefinedFactorytypedefEnvironment:Environment({undefined})argumentundefinedfield
Template:Template({undefined})argument
0.6.0 (diff) #
- bump SDK version to 3.3.0.
- update dependencies.
- internal changes.
chromeplatform tests.- added:
- statements:
importfrom
Template:Template.fromNode({globals})argumentglobalsfield
- statements:
- restored:
- conditional and variable
extendsstatement variants - choice, ignore missing and variable
includestatement variants
- conditional and variable
- changed:
Environment:Environment.lex()return fromList<Token>toIterable<Token>Environment.scan(tokens)argument type fromList<Token>toIterable<Token>
- removed:
- exceptions:
FilterArgumentError
*argsand**kwargssupport
- exceptions:
0.5.0 #
- minimal SDK version: 3.0.0.
- internal changes.
- added:
Template:Template.fromNode(Environment environment, {String? path, required Node body})constructor
- statements:
macrocall
- filters:
itemstitle
- changed:
Environment:Environment({modifiers})argument type fromList<NodeVisitor>toList<Node Function(Node)>modifierstype fromList<NodeVisitor>toList<Node Function(Node)>scan(...)return type fromList<Node>toNodeparse(...)return type fromList<Node>toNode
Template:Template({modifiers})argument type fromList<NodeVisitor>toList<Node Function(Node)>
- filters:
truncatearguments are now positional
- removed:
Template:Template.fromNodes(...)constructor
- statements:
autoescape
- filters:
forceescapesafeunsafe
- tests:
escaped
0.4.2 #
- internal changes.
0.4.1 #
- update links.
0.4.0 #
- minimal SDK version: 2.18.0.
- added:
passContextandpassEnvironmentfunctionsprintto globals{{ do print(name) }}EnvironmentEnvironment({lineCommentPrefix, lineStatementPrefix, newLine, autoReload, modifiers, templates})constructor argumentsautoReloadfieldlexerfieldlineCommentPrefixfieldlineStatementPrefixfieldloaderfieldmodifiersfieldnewLinefieldlexmethodscanmethodparsemethod
TemplateTemplate({path, lineCommentPrefix, lineStatementPrefix, newLine, modifiers, templates})constructor argumentsrenderTomethod
- exceptions are public now:
TemplateErrorTemplateSyntaxErrorTemplateAssertionErrorTemplateNotFoundTemplatesNotFoundTemplateRuntimeErrorFilterArgumentError
- statements:
dowith
- filters:
dictsortreplacereversesafeslicestriptagstruncatewordcountwordwrapitemmaptojson
- test:
filtertest
- changed:
FieldGettertypedef renamed toAttributeGetterdefaultfilter compare values withnull, no boolean argumentdefinedandundefinedtests compare values withnullEnvironmentEnvironment({getField})constructor argument renamed togetAttributegetFieldfield renamed togetAttribute
TemplateTemplate({parent})constructor argument renamed toenvironmentand doesn't copy the environmentrenderMapmethod renamed torender
Loader.listSourcesmethod renamed tolistTemplatesMapLoader.mappingfield renamed tosourcesFileSystemLoaderFileSystemLoader({paths})argument now non-nullable, defaults to['templates']- moved to
package:jinja/loaders.dartlibrary
package:jinja/get_field.dartlibrary renamed topackage:jinja/reflection.dartgetFieldfunction renamed togetAttribute
- removed:
Undefinedtype andmissingobjectEnvironment.undefinedmethodTemplate.rendermethodFileSystemLoader:FileSystemLoader({path, autoReload})argumentsautoReloadfielddirectoryfield
- slices and negative indexes
- conditional and variable
extendsstatement variants - choice, ignore missing and variable
includestatement variants
- internal changes
- work in progress