dust.js

Static HTML compilation with partials using Grunt.js [closed]

送分小仙女□ 提交于 2019-12-03 05:51:37
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . 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 plugin, and this plugin for Grunt that compiles Dust.js

Choosing the right UI templating tool - dust.js? [closed]

倾然丶 夕夏残阳落幕 提交于 2019-12-03 00:33:37
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 years ago . 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 dust.js as an option for

Static HTML compilation with partials using Grunt.js [closed]

主宰稳场 提交于 2019-12-02 19:13:04
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 plugin, and this plugin for Grunt that compiles Dust.js templates to static HTML. I don't really like Jade's syntax, and the Dust plugin for Grunt is less than ideal. Are there any static HTML templating languages with Grunt/Gulp support that don't deviate too much from regular HTML, and are still active? I found this plugin named grunt-includes .

Choosing the right UI templating tool - dust.js? [closed]

拜拜、爱过 提交于 2019-12-02 14:08:28
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 dust.js as an option for templating. The questions: I'm interested in hearing what users of dust.js think of it: Has it been successful? Is it easy to use? Is it sufficiently documented? Is community support good? (only 6 questions on ST tagged 'dust.js' !) What are the pros and cons when compared to other templating tools such as Underscore 's templating

How do I implement custom rendering logic in dust.js?

血红的双手。 提交于 2019-11-30 07:45:58
I'm using dust.js to render a list of variable names that are sometimes long and contain underscores like: SUM_COUNT_LABOR_COUNTRIES_SMS_PAST The browser doesn't wrap on underscores so it can get ugly. I'd like my dust template to add a zero-width space after each underscore so the browser can wrap it. This definitely belongs in the template layer and not with the model, but I can't figure out how to properly achieve this with dust.js and it's otherwise very good principle of separating presentation from logic. Do I create a "helper" function? Where do I put the helper function? How do I call

Basic Example of Client Side Templating with Dust.js

倾然丶 夕夏残阳落幕 提交于 2019-11-28 23:13:04
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 stackoverflow post answered many of my questions, but I still have a few things I want to clarify. In the environment I work in I have no access to anything on the server side, so everything I create has to be able to run entirely in the client's browser. For this example, I'll try to recreate this code sample from the LinkedIn Dust Tutorial . I

Basic Example of Client Side Templating with Dust.js

落爺英雄遲暮 提交于 2019-11-27 21:11:26
问题 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 stackoverflow post answered many of my questions, but I still have a few things I want to clarify. In the environment I work in I have no access to anything on the server side, so everything I create has to be able to run entirely in the client's

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

為{幸葍}努か 提交于 2019-11-27 11:44:29
问题 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 to /product/555 I'd like to use JavaScript to update the template on the client-side. I'd like to use something like Knockout.js or Angularjs, but I don't see how I can pre-populate those templates with some initial data on the server and still