A powerful templating engine with inheritance, asynchronous control, and more (jinja2 inspired)
BSD-2-CLAUSE License
Bot releases are hidden (Show)
Published by carljm almost 9 years ago
null
from WebLoader
on missing template instead of throwing anWebLoader
to supportignore missing
flag on the include
tag. If ignore missing
isWebLoader
striptags
filter. Thanks IvanPublished by carljm almost 9 years ago
striptags
filter. Thanks Anthony Giniers. Merge ofdefault
filter without specifyinginclude
now supports an option to suppress errors if the template does notPublished by carljm about 9 years ago
WebLoader
without opts
. Merge ofhasExtension
and removeExtension
methods to Environment
. Merge ofsort
filter. Merge ofnone
as a lexed constant evaluating to null
. Merge ofraw
blocks. Thanks Aaron O'Mullan. Merge ofPublished by jlongster about 9 years ago
Most of the changes can be summed up in the issues tagged 2.0.
Or you can see all commits.
Most important changes:
{ autoescape: false }
in the options to turn it off.{ watch: true }
to start the watcher.default
filter has changed. It will show the default value only if the argument is undefined. Any other value, even false-y values like false
and null
, will be returned. You can get back the old behavior by passing true
as a 3rd argument to activate the loose-y behavior: foo | default("bar", true)
. In 2.0 if you don't pass the 3rd argument, a warning will be displayed about this change in behavior. In 2.1 this warning will be removed.filter
tagPublished by jlongster over 9 years ago
This is an extremely minor release that only adds an .npmignore so that the bench, tests, and docs folders do not get published to npm. Nunjucks should download a lot faster now.
Published by jlongster over 9 years ago
This is exactly the same as v1.3.1, just fixing a typo in the git version tag.
Published by jlongster over 9 years ago
We added strict mode to all the files, but that broke running nunjucks in the browser. Should work now with this small fix.
Published by jlongster over 9 years ago
.
, like ./foo.html
FileSystemLoader
now takes a noCache
option, if true will disable caching entirelylstripBlocks
and trimBlocks
available to clean output automaticallyselectattr
and rejectattr
filterscc83724 prep for v1.3.0
eaa0f78 Merge pull request #370 from MaxKramnik/master
c00a33b Removing ignoreInitial option for chokidar to refresh view after first template save, removing event == "add"
3664163 Merge pull request #391 from SamyPesse/fix/windows
0f8b21b Simplify EOL norm regex in tests
41dd01c Disable windows tests for node 0.8
ce18959 Add very simple test for precompile
ff075af Fix #392: fix precompile.js for strict mode
7ff10e3 Use explicit path to mocha bin in test script
3b2f4ea Remove make as testing dependency
f58fd64 Add appveyor.yml for windows testing
5b48f29 Improve EOL normalization for tests
f08182c Add method to normalize EOL in tests
8974aa3 Merge pull request #390 from mozilla/fix-watching
cde3dc5 fix watching in node-loader
dda4e84 Fix escape for windows path
8ef8c47 Merge pull request #389 from SamyPesse/patch-1
1388170 Fix error when template is not found
2a2a31f Merge pull request #387 from mozilla/eqeqeq
2af7844 use === and !== instead == and !=
4245822 Merge pull request #386 from mozilla/use-strict
459e400 Add 'use strict'; #1
3f83a11 Merge pull request #385 from mozilla/single-quote
d930a2d Change always using single quote
901d808 Merge pull request #379 from SamyPesse/fix/378
4568ace Add method isRelative to loader
fcd71c6 Merge pull request #380 from stevemao/patch-1
4a5e862 add keywords in package.json
e0b1431 Don't force template name to be a string in compiler
c8b3b16 Remove useless that
17bc3f0 Fix #378: move cache to loader
252b76a Fix #375: Always resolve path when parentName is present
0f4a85c Improve cache performance for relative path
af62c97 Add test for cache path of relative paths
42d2b9f minor cleanup, regenerate browserfiles
1077f97 Merge pull request #349 from SamyPesse/feature/relative
9c6b2bb Pass name to compiler creation
52412a1 Accept path options in env.renderString
103dd2c Add test for relative path and renderString
1b7dcc6 Resolve of relative paths is done by loader
40d4ce7 Add tests for relative paths
9946ee8 Fix test of position of template file
d292cce Accept absolute path in FileSystemLoader
7bc9cd3 use parentName in getTemplate to resolve name
8285207 Pass name to getTemplate
4ce458e emit update when the template is changed the first time when the event == "add"
3dd3158 Add selectattr and rejectattr in built-in filters list.
aae3ec9 merge docs into main repo
8c6e2bc Merge pull request #354 from SamyPesse/feature/nocacheoption
dafc9e3 Merge pull request #355 from radev/master
ab9a7c7 Merge pull request #365 from carljm/selectattr
904316a Merge pull request #364 from carljm/list-on-array
dcfa36a Allow list filter to pass arrays through as-is.
bab41dc Add support for selectattr and rejectattr filters.
9a77099 Moved environment options to opts
fecfa42 Implement lstripBlocks and trimBlocks from Jinja2
e7572fd Add option to "noCache" to FileSystemLoader
Published by jlongster over 9 years ago
in
operator has a lower precedence now. This is potentially a breaking change, thus the minor version bump. See https://github.com/mozilla/nunjucks/pull/336
import with context
now implemented: https://github.com/mozilla/nunjucks/pull/319
24024b5 (HEAD, origin/master, master) Merge pull request #353 from SamyPesse/patch-1
324a875 Fix tests for non-breaking whitespaces
8b81acb Add test for non-breaking spaces
0815d4d use \u00A0
instead of String.charCode
2aaed2a Add nonbreaking space to whitespace chars list
52a50fc Fix spelling
c0baa5c Merge pull request #306 from eventEmitter/master
5f0c528 Merge pull request #336 from carljm/in-precedence
219d2eb Merge pull request #339 from oyyd/my_fork
140ccad Merge pull request #346 from fabien/master
1aaec23 fixed merge conflict
e1ab103 Update package.json
3a34fc9 Fix #317
f655747 Add test to verify that imports are without context by default.
f710479 Bind 'in' operator more tightly than boolean operators.
d5fd4c4 add test to ensure without context works
dbdc966 implement import with context
4f6b02e async rendering doesn't throw anymore when compiling errors (fixes https://github.com/mozilla/nunjucks/issues/233)
f0b7384 Merge remote-tracking branch 'origin/master'
71d050f fix type in _matches in tokenizer (fixes #294)
99033de Merge pull request #300 from rhengles/bin-precompile-windows
b8fe5ca fix typo in error message in parsePrimary (fixed #297)
e67a405 precompile command for Windows
fbf5dd5 Revert "upgrade chokidar"
Published by jlongster about 10 years ago
User visible changes:
urlize
that would remove periods{%
and %}
) was made Environment-specific internally. Previously they were global even though you set them through the Environment./foo/g
.replace
filter can take a regex as the first argumentcall
tag was implementedfor
tags can now take an else
clausecycler
object now exposes the current item as the current
propertychokidar
library was updated and should fix various issuesDev changes:
Published by jlongster about 10 years ago
Mixed up a few things in the 1.0.6 release, so another small bump. This merges in one thing:
length
filter will not throw an error is used on an undefined variable. It will return 0
if the variable is undefined.Published by jlongster about 10 years ago
addGlobal
method to the Environment objectset
Published by jlongster over 10 years ago
Published by jlongster over 10 years ago
Published by jlongster over 10 years ago
/
in paths when precompiling templatesif
statementsautoescape
propertyPublished by jlongster almost 11 years ago
for
loop introduces a new{% for name in names %}
, and if you have name
in thename
from the for loop