Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

nunjucks-fuzzyfile

velocityzen12MIT1.0.1

Nunjucks fuzzy file search tag extension

templates, nunjucks, extension, fuzzy, file, name

readme

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.