Assemble plugin (^0.6.0) for loading globs of views onto custom view collections. Also works with verb or other Templates.js based applications.
Install with npm:
$ npm install --save assemble-loader
var assemble = ;var loader = ;var app =app;app;app;// you can now load globs of templates onto any collectionapp;app;
var assemble = ;var loader = ;var app =// use the pluginapp;
Optionally pass glob patterns to the plugin:
var app = ;// this can only be done once when the plugin is registeredapp;// you can use the `.loadViews()` method any number of timesapp;
When the plugin is added to the
app instance (as in the previous example), a
.load method will also be added to every collection created.
var app =;// cache views on `app.views.posts`app;// cache views on `app.views.docs`app;
If you only want to add the loader to a specific collection, you can pass the plugin to the
.use method on the collection.
var app = ;// `create` returns the collection instanceapp;// this works too, since `create` adds methods to `app`// for the collectionappposts;
- load-templates: Load templates/views using globs, file paths, objects, arrays, or key-value pairs. | homepage
- matched: Adds array support to node-glob, sync and async. Also supports tilde expansion (user home) and… more | homepage
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm test
Copyright © 2017, Jon Schlinkert. MIT
This file was generated by verb-generate-readme, v0.4.2, on February 20, 2017.