veams-plugin-templater

    1.0.1 • Public • Published

    VeamsTemplater Plugin

    This plugin adds the possibility to render your handlebars templates in an easy way. You can register the engine, templates, partials and helpers and use them directly in your other classes.

    How to

    import Veams from 'veams';
    import VeamsTemplater from 'veams-plugin-templater';
    import handlebars from 'handlebars/runtime';
    import { templates, partials } from './templates';
    import { customHelper } from './helpers';
     
    // Add plugins to the Veams system
    Veams.use(VeamsTemplater, {
        engine: handlebars,
        templates: templates,
        partials: partials,
        helpers: [
            customHelper
        ]
    });
     
    // Render the template
    $(body).append(
        Veams.templater.render('_test-partial', {data: 'custom data passed to partial'})
    );
     

    Install

    npm i veams-plugin-templater

    Homepage

    veams.org/

    DownloadsWeekly Downloads

    4

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • sebastian-fitzner
    • andy-gutsche