Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    optimizer-lodashpublic

    optimizer-lodash

    Plugin for the RaptorJS Optimizer that compiles Lo-Dash templates to CommonJS modules. These templates can easily be rendered using the view-engine module (in conjunction with view-engine-lodash).

    Installation

    npm install optimizer-lodash --save

    Enable the plugin:

    require('optimizer').configure({
        plugins: [
            'optimizer-lodash'
        ]
    });

    You will also need to install view-engine and view-engine-lodash:

    npm install view-engine --save
    npm install view-engine-lodash --save

    Usage

    Enable the Lo-Dash view engine:

    require('view-engine').register(
        'lodash',
        require('view-engine-lodash'));

    Render templates on the client or server:

    var template = require('view-engine').load('./template.lodash');
    template.render({
            name: 'Frank'
        },
        function(err, output) {
            console.log('Template output: ', output);
        });

    install

    npm i optimizer-lodash

    Downloadsweekly downloads

    6

    version

    1.1.5

    license

    Apache License v2.0

    repository

    githubgithub

    last publish

    collaborators

    • avatar
    • avatar
    • avatar