UNPKG

base-loader

Version:

Base loader for Template-based applications.

64 lines (39 loc) 1.46 kB
# base-loader [![NPM version](https://badge.fury.io/js/base-loader.svg)](http://badge.fury.io/js/base-loader) > Base loader for Template-based applications. ## Install with [npm](npmjs.org) ```bash npm i base-loader --save ``` ## Usage ```js var loader = require('base-loader'); var App = require('template'); var app = new App(); app.loader('base', [loader]); ``` Now you can use the loader to load templates for custom template types. ```js // create the custom type, and assign the loader app.create('post', 'posts', ['base']); // load some templates! app.posts('*.md'); ``` ## Related projects [template](https://github.com/jonschlinkert/template): Render templates using any engine. Supports, layouts, pages, partials and custom template types. Use template… [more](https://github.com/jonschlinkert/template) ## Running tests Install dev dependencies: ```bash npm i -d && npm test ``` ## Contributing Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/base-loader/issues) ## Author **Jon Schlinkert** + [github/jonschlinkert](https://github.com/jonschlinkert) + [twitter/jonschlinkert](http://twitter.com/jonschlinkert) ## License Copyright (c) 2015 Jon Schlinkert Released under the MIT license. *** _This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 01, 2015._ <!-- reflinks generated by verb-reflinks plugin -->