This repository has been archived by the owner on Apr 11, 2018. It is now read-only.
Releases: paularmstrong/swig
Releases · paularmstrong/swig
v1.0.0-rc3
- Fixed Allow bools in token parser by default. gh-321
- Fixed Allow variables as object values. gh-323
- Fixed Don't partially match logic words. gh-322
- Fixed Parent tag in parent's block with no local block edge case. gh-316
v1.0.0-rc2
- Changed Function output from
variable
blocks are no longer auto-escaped. gh-309 - Fixed Allow nested macros to work when importing. gh-310
- Fixed swig.setDefaultTZOffset. gh-311
- Changed
set
tag assigns to the local context, allowing setting withinfor
loops, etc. gh-303 - Fixed Standardize variable undefined checking. gh-301
- Fixed Remove multiple redefinition of block-level tags in compiled templates.
- Fixed Performance issue with compile if no default locals are defined.
v1.0.0-rc1
- Added
include
tag now acceptsonly
(and is preferred, if possible). gh-240 - Added
swig.version
and-v
to cli - Changed Deprecated
raw
filter. Usesafe
. - Changed Allow
import
andmacro
tags to be outside of blocks. gh-299 - Changed Don't escape
macro
output. gh-297 - Changed (Custom) Filters can be marked as
safe
to disable auto-escaping. gh-294 - Fixed
{% for k,v ... %}
tag syntax assigned variables backwards. - Fixed Filters being applied to empty functions throwing errors. gh-296
- Fixed
include
paths on windows. gh-295
v1.0.0-pre3
v1.0.0-pre2
- Changed Binary: Allow --method-name to be a shortcut for --wrap-start var setting.
- Changed Make reverse filter an alias for
sort(true)
. - Added Allow asyncronous
compileFile
andrenderFile
operations. gh-283 - Added Filter:
sort
. - Added Allow {% end[tag] tokens... %}. gh-278
- Added Built source map for minified browser source.
- Added Contextual support for object method calls. gh-275
- Added
parser.on('start'|'end'...
options. gh-274 - Added Allow object prototypal inheritance. gh-273
- Fixed Prevent circular extends. gh-282
- Fixed Throw an error if reserved word is used as var. gh-276
- Fixed Add filename to errors if possible. gh-280
- Fixed Filters work over arrays/objects if possible. gh-259
- Fixed Allow
{% parent %}
to work in middle parent templates. gh-277 - Fixed Allow newlines in tags/vars/comments. gh-272
v1.0.0-pre1
This is a completely rewritten version of Swig that includes many enhancements and additional benefits. Much throughout the API and usage has changed. For more information read the migration guide
- Changed Completely rewritting parsing engine supports many more syntaxes and is much easier to extend.
- Changed There is no more
swig.init
method. - Changed Custom filters can be added using
swig.addFilter
- Changed Custom tags can be added using
swig.addTag
- Changed Writing custom tags uses an entirely new, simplified format
- Changed Removed the underscore/lodash dependency
- Changed Template parsing has been completely rewritten
- Changed
swig.compileFile
returns a function that renders templates, not an object - Changed Express-compatible using
swig.renderFile
. - Changed
extends
,import
, andinclude
now reference files with relative paths from the current file (info). - Changed
extends
may no longer accept variables (info). - Changed
else if
tag is nowelseif
orelif
. - Changed Removed
only
argument frominclude
. - Changed allow
_
,$
to start var names in templates. - Changed Documentation is auto-generated from jsdoc comments in-files.
- Added Ability to set custom var/tag/comment controls (
{{
,}}
, etc, can be customized). - Added Variable/string concatenation gh-135.
- Added Binary application for
compile
,run
, andrender
(Lets you pre-compile templates into JS functions for client-side delivery). - Fixed Lots.