laravel-mix-njk

1.0.2 • Public • Published

laravel-mix-njk

Laravel Mix extension to compile Nunjucks templates.

Install

npm install laravel-mix-njk --save-dev

Usage

const mix = require('laravel-mix');
require('laravel-mix-njk');

mix.njk('resources/views/', {
  searchPath: '/',
  context: {
    foo: 'bar'
  }
});
  • searchPath - Search path for templates/partials
  • context - Nunjucks data passed to the template

For more info about Nunjucks API, check https://mozilla.github.io/nunjucks/api.html

Package Sidebar

Install

npm i laravel-mix-njk

Weekly Downloads

2

Version

1.0.2

License

Apache-2.0

Unpacked Size

17.3 kB

Total Files

8

Last publish

Collaborators

  • joaopjt