All Projects → squirrellyjs → Squirrelly

squirrellyjs / Squirrelly

Licence: mit
Semi-embedded JS template engine that supports helpers, filters, partials, and template inheritance. 4KB minzipped, written in TypeScript ⛺

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to Squirrelly

Yarte
Yarte stands for Yet Another Rust Template Engine
Stars: ✭ 189 (-47.35%)
Mutual labels:  template-engine, handlebars
Feathericon
simply generic vector icon collection - including sketch file, svg files, and font files.
Stars: ✭ 178 (-50.42%)
Mutual labels:  npm-package, pug
Jade
Jade.go - pug template engine for Go (golang)
Stars: ✭ 251 (-30.08%)
Mutual labels:  template-engine, pug
Pug
Pug template engine for PHP
Stars: ✭ 341 (-5.01%)
Mutual labels:  template-engine, pug
pypugjs
PugJS syntax adapter for Django, Jinja2 and Mako templates
Stars: ✭ 237 (-33.98%)
Mutual labels:  template-engine, pug
Handlebars Iron
Handlebars middleware for Iron web framework
Stars: ✭ 119 (-66.85%)
Mutual labels:  template-engine, handlebars
Mikado
Mikado is the webs fastest template library for building user interfaces.
Stars: ✭ 323 (-10.03%)
Mutual labels:  template-engine, handlebars
Handlebars Rust
Rust templating with Handlebars
Stars: ✭ 632 (+76.04%)
Mutual labels:  template-engine, handlebars
velvet
A sweet velvety templating package
Stars: ✭ 72 (-79.94%)
Mutual labels:  template-engine, handlebars
tale-pug
Tale Pug is the popular JavaScript Template Engine Pug, formerly Jade, for PHP!
Stars: ✭ 32 (-91.09%)
Mutual labels:  template-engine, pug
Handlebars.java
Logic-less and semantic Mustache templates with Java
Stars: ✭ 1,204 (+235.38%)
Mutual labels:  template-engine, handlebars
nestjs-mailer
🌈 A simple implementation example with and without email-templates using mailer module for nest js built on top of nodemailer.
Stars: ✭ 82 (-77.16%)
Mutual labels:  handlebars, pug
Phug
Phug - The Pug Template Engine for PHP
Stars: ✭ 43 (-88.02%)
Mutual labels:  template-engine, pug
Aeromock
Lightweight mock web application server
Stars: ✭ 152 (-57.66%)
Mutual labels:  template-engine, handlebars
Handlebars.net
A real .NET Handlebars engine
Stars: ✭ 723 (+101.39%)
Mutual labels:  template-engine, handlebars
Handlebars Webpack Plugin
Renders your html-template at build time
Stars: ✭ 135 (-62.4%)
Mutual labels:  npm-package, handlebars
Pupa
Simple micro templating
Stars: ✭ 231 (-35.65%)
Mutual labels:  npm-package, template-engine
pug4py
Use Pug.js within any python framework
Stars: ✭ 17 (-95.26%)
Mutual labels:  template-engine, pug
Email Templates
📫 Create, preview, and send custom email templates for Node.js. Highly configurable and supports automatic inline CSS, stylesheets, embedded images and fonts, and much more!
Stars: ✭ 3,291 (+816.71%)
Mutual labels:  template-engine, pug
Ngx Meta
Dynamic page title & meta tags utility for Angular (w/server-side rendering)
Stars: ✭ 331 (-7.8%)
Mutual labels:  npm-package

Squirrel

squirrelly

Documentation - Chat - RunKit Demo - Playground

GitHub package.json version (master) Travis All Contributors Coveralls Code Shelter Donate

Summary

Squirrelly is a modern, configurable, and blazing fast template engine implemented in JavaScript. It works out of the box with ExpressJS and the full version weighs only ~4KB gzipped.

This is version 8 - a new, more powerful rewrite of Squirrelly. It adds multiple features (like filter parameters, whitespace control, partials, and template inheritance) to bring you a template engine with the power of Nunjucks, the simplicity of EJS, and the small bundle size of its earlier versions.

Squirrelly v7 will continue to be maintained, and can be found at https://github.com/squirrellyjs/squirrelly/tree/v7.

Read about the changes

Looking for a lightweight, faster, and more reliable alternative to EJS? Check out Squirrelly's cousin, Eta.

Why Squirrelly?

Simply put, Squirrelly is super lightweight, super fast, super powerful, and super simple.

🌟 Features

  • 🔧 Helpers, filters
  • 🔧 Great error reporting
  • 📦 0 dependencies
  • 🔨 Conditionals
  • 🔧 Better quotes/comments support
    • ex. {{someval + "name }}" }} compiles correctly, while it fails with DoT or EJS
  • ⚡️ Exports ES Modules as well as UMD
  • 🔨 Loops
  • 🔧 Custom delimeters
  • 📝 Easy template syntax
  • 🔧 Precompilation
  • 🔨 Partials
  • 🔧 Inline JavaScript
  • 🔨 Comments
  • 🔧 Caching
  • 🚀 Super Fast
    • Squirrelly has been benchmarked against Marko, Pug, doT, Swig, Handlebars, Mustache, and Nunjucks. In each test, Squirrelly was fastest.
  • ⚡️ Async support: async filters, helpers, partials
  • 🔧 Template inheritance

📜 Docs

We know nobody reads through the long and boring documentation in the ReadMe anyway, so head over to the documentation website:

📝 https://squirrelly.js.org

📓 Examples

Simple Template

var myTemplate = "<p>My favorite kind of cake is: {{it.favoriteCake}}</p>"

Sqrl.render(myTemplate, {favoriteCake: 'Chocolate!'})
// Returns: '<p>My favorite kind of cake is: Chocolate!</p>

Conditionals

{{@if(it.somevalue === 1)}}
Display this
{{#else}}
Display this
{{/if}}

Loops

{{@each(it.somearray) => val, index}}
Display this
The current array element is {{val}}
The current index is {{index}}
{{/each}}

✔️ Tests

Tests can be run with npm test. Multiple tests check that parsing, rendering, and compiling return expected results, formatting follows guidelines, and code coverage is at the expected level.

Resources

To be added

Projects using squirrelly

[Waiting for permissions]

  • Cypress: Fast, easy and reliable testing for anything that runs in a browser
  • txAdmin: A full featured web panel to manage & monitor your FiveM Server remotely, used by over two thousand servers worldwide
  • Add yours!

Contributors

Made with ❤ by @nebrelbug and all these wonderful contributors (emoji key):


Ben Gubler

💻 💬 📖 ⚠️

Clite Tailor

🤔 💻

Ioan CHIRIAC

💻 🤔

Lucas Wilson

🐛 💻

Jon McLean

💻 ⚠️

Note: because we completely rewrote Version 8 and it has a separate Git history, this chart excludes the dozens of contributors to Version 7. Their contributions are deeply appreciated and many of their ideas and code contributions are being used in Squirrelly v8. Many of their contributions can be found in the v7 branch commit history.

This project follows the all-contributors specification. Contributions of any kind are welcome!

Credits

  • Async support and file handling were added based on code from EJS, which is licensed under the Apache-2.0 license. Code was modified to throw informative errors and work with Squirrelly's API
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].