0.9.0 • Published 8 years ago

sweets-toffee-rum v0.9.0

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

Sweets

Flexible declarative web framework for real-time projects

Toffee with rum

Adds several useful filters and tags for nunjucks templates environment

Filters

shuffle

Returns shuffled array or object keys array

date

Formats date using moment library

{{ time | date("MMM Do YY", [locale]) }}

Tags

match

Matches string to RegExp and returns true or false or optional values

{% match text, "^a", ["truthy"], ["falsy"] %}

Settings

this.template = {
    sweet: "toffee",
    extensions: ["rum"] // <- add this
    options: {
        path: path.join(this.root, "templates")
    }
};