1.0.1 • Published 6 years ago

nunjucks-fuzzyfile v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Nunjucks fuzzy file search tag extension

NPM Version NPM Downloads

Nunjucks fuzzy file search tag extension.

Installation

npm i nunjucks-fuzzyfile

Usage

const Fuzzyfile = require('nunjucks-fuzzyfile');

// env is nujucks environment
env.addExtension('fuzzyfile', new Fuzzyfile());

fuzzyfile

Looks for file matching pattern filename*.ext and returns matched filename. If no matches found returns the filename.

{% fuzzyfile filepath %}

Example:

{% fuzzyfile 'static/app.js' %}

License: MIT.