This repository has been archived by the owner on Apr 11, 2018. It is now read-only.
v1.0.0-pre1
Pre-release
Pre-release
paularmstrong
released this
16 Aug 13:29
·
287 commits
to master
since this release
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.