Giter VIP home page Giter VIP logo

marionette-dust's Issues

async rendering of dustjs - race condition?

Hi simon, AFAIK dustjs renders asynchronously, so the following code will result in a race condition especially if the template is complex. Have you encountered such a problem? Thanks.

    var html;
    // Template must be compiled and in the dust cache. Recommend pre-compiling
    // and loading the templates as scripts at app start.
    dust.render(template, data, function (err, out) {
        html = out;
    });
    return html;

Version out of date in bower.json

Errors when installing with bower:

bower marionette-dust#0.3.1         extract archive.tar.gz
bower marionette-dust#0.3.1         mismatch Version declared in the json (0.1.6) is different than the resolved one (0.3.1)
bower marionette-dust#0.3.1         invalid-meta backbone.marionette.dust is missing "ignore" entry in bower.json

Can you return an asynchronous value?

Hi,
The render function return an asynchronous value, wouldn't html returned as undefined???

Backbone.Marionette.Renderer.render = function (template, data) {
        var html;
        dust.render(template, data, function (err, out) {
            html = out;
        });
        return html;
    };

could you post a working example?

Hello Simon - thanks for this and your Maryo generator, it's great to see somebody integrating Dust.js with Marionette!

I can't seem to get the dust templates to load based on your sample, but I'm a super noob to Marionette, so surely that's the problem. Could you possibly post a simple working example of loading a non AMD compiled template into a Marionette view of some kind?

thanks in advance :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.