jinja 0.4.0-dev.53
jinja: ^0.4.0-dev.53 copied to clipboard
Jinja2 template engine for Dart. Variables, expressions, control structures and template inheritance.
0.4.0-dev.53 #
- minimal SDK version: 2.18.0
- added:
PassArgument,passContextandpassEnvironment...printto globals:{{ do print(name) }}EnvironmentEnvironment({lineCommentPrefix, lineStatementPrefix, newLine, autoReload, modifiers, templates})constructor argumentsautoReloadfieldlexerfieldlineCommentPrefixfieldlineStatementPrefixfieldloaderfieldmodifiersfieldnewLinefieldlexmethodlistTemplatesmethodparsemethodscanmethod
TemplateTemplate({path, lineCommentPrefix, lineStatementPrefix, newLine, modifiers, templates})constructor argumentsgeneratemethod
formatPathfunction to normalize template pathsFileSystemLoader.findFilemethod- exceptions are public now:
TemplateErrorTemplateSyntaxErrorTemplateAssertionErrorTemplateNotFoundTemplatesNotFoundTemplateRuntimeError
- statements:
dowith
- filters:
dictsortreplacereversesafeslicestriptagstruncatewordcountwordwrapitem
filters,testsandruntimelibrary
- changed:
FieldGettertypedef renamed toAttributeGettermappingtest renamed tomapdefaultfilter compare values withnulldefinedandundefinedtests 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({path})constructor argument is nullable now- moved to
package:jinja/loaders.dartlibrary
package:jinja/get_field.dartlibrary renamed topackage:jinja/reflection.dartgetFieldfunction renamed togetAttribute
- removed:
Undefinedtype andmissingobjectEnvironment.undefinedmethodTemplate.rendermethodFileSystemLoader:FileSystemLoader({bool autoReload})constructor argumentautoReloadfielddirectoryfield
- slices and negative indexes
- conditional and variable
extendsstatement variants - choice, ignore missing and variable
includestatement variants
- internal changes
- work in progress