Questions tagged [dust.js]

Dust is a JavaScript templating engine.

Dust is a JavaScript templating engine designed to provide a clean separation between presentation and logic without sacrificing ease of use. It is particularly well-suited for asynchronous and streaming applications.

Links:

441 questions
36
votes
2 answers

Choosing the right UI templating tool - dust.js?

I work on a large Java based web application, it has been built up over the past 5 or so years - the UI needs an overhaul / to be largely re-written. We are investigating the available UI tools/libraries/frameworks to use and have come across…
Ed .
  • 6,373
  • 8
  • 62
  • 82
29
votes
4 answers

What is server side rendering of javascript?

Some javascript frameworks like Dust.js claim that they ALSO support server-side rendering (in addition to client side rendering) as well. Can someone explain how does this work? My understanding is that the JS is always executed in the browser…
Aravind Yarram
  • 78,777
  • 46
  • 231
  • 327
19
votes
3 answers

Is it possible to render dust.js templates synchronously?

I am trying to write an adapter for a client-side HTML/JS templating system to use dust.js under the hood. Unfortunately the API expects render operations to occur synchronously: the rendered output should be returned from the render() call. Dust.js…
cliff.meyers
  • 17,666
  • 5
  • 51
  • 66
19
votes
2 answers

Basic Example of Client Side Templating with Dust.js

This is my first foray into client-side templating and I want to make sure I'm understanding it and using it correctly. After reading this LinkedIn engineering blog, I decided to go with dust.js rather than mustache or handlebars. Note that this…
dougmacklin
  • 2,560
  • 10
  • 42
  • 69
18
votes
3 answers

Static HTML compilation with partials using Grunt.js

I've been looking all over for something that will let me precompile static websites using Grunt. It needs to have partials, so I can include things like a common header/footer across the pages. So far, I've only really found Jade, which has a grunt…
AAA
  • 1,364
  • 1
  • 10
  • 15
13
votes
4 answers

HTML template filled in server-side and updated client-side

I have a webpage with dynamic content. Let's say it's a product page. When the user goes directly to example.com/product/123 I want to render my product template on the server and send html to the browser. However, when the user later clicks a link…
takteek
  • 7,020
  • 2
  • 39
  • 70
12
votes
2 answers

$idx and $len in a dust.js conditional statement

The documentation on dust is just awful, I've already perused everything I can possibly find and cannot figure out how this is supposed to work. I'm having this problem with the supposed special values $idx and $len, which, if I have guessed…
Robert C. Barth
  • 22,687
  • 6
  • 45
  • 52
10
votes
1 answer

What is the difference between angularjs and dust.js?

I am currently using the Backbone philosophy which involves dust.js for template style. Recently I came across AngularJS, which extends the HTML syntax with custom elements and attributes. Cons of Backbone+dust.js environment: Upgrading components…
Anil
  • 3,912
  • 5
  • 35
  • 46
9
votes
4 answers

Dust if condition

I'm having trouble with a dust if condition. I have a partial that points to 2 different dust templates depending on the Country code {>"receipt/merchantInfo/merchantInfo_{countryCode}"/} I'm trying to make an if else condition that will figure out…
Tom Feeney
  • 97
  • 1
  • 1
  • 3
9
votes
2 answers

how to use dustjs-linkedin as client side templating?

I get the idea of server and client side templating, but dust.js confuses me a little bit. In order to use dust.js for client side templating, you need three steps: complie the template load the template render the template Right? But where do the…
paynestrike
  • 4,348
  • 14
  • 46
  • 70
8
votes
5 answers

Use dust templates with angular js

I am new to angularjs environment, I want to use angular using dust templates as the current application has dust templates but I could not find anything on how I can use my existing dust templates with angular js. The problem is dust templates have…
Himanshu
  • 517
  • 1
  • 4
  • 13
7
votes
1 answer

Dust: difference between logic sections {?} and {#}

What exactly is the difference between {?} and {#}? -- After a little test, listing all truthy/falsy values for {?}, and comparing them to {#}: context: { values: [ // false '', "", false, null, undefined, [], //…
abernier
  • 27,030
  • 20
  • 83
  • 114
7
votes
2 answers

Why should we wrap our templates inside script blocks?

Background All the JS template engines recommend putting your template text inside script blocks like so: