When comparing swig vs Nunjucks, the Slant community recommends Nunjucks for most people. In the question“What are the best JavaScript templating engines?” Nunjucks is ranked 5th while swig is ranked 14th.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Works both on the client and on the server
Available for node.js and major web browsers
Pro Does not hide HTML
Swig does not abstract HTML syntax from you (like e.g. Jade does) giving a certain filling of control over the markup.
Pro Very user friendly
Pro Building blocks for CMS Websites
Another token based system with all of the logic, looping and variable control that other engines provide. But in addition it supports some more advanced page composition elements e.g. block inheritance, includes, layout inheritance, custom tags and macros — all absolutely perfect for a CMS where pages are typically composed of a series of “building blocks”.
Reference:
link
Pro Suppported by Mozilla
Pro Has Jinja2 as role model
Pro Open Source
Cons
Con No updates for at least 6 months
Swig has not received any new commits since June 25 2015.