Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>So here's the trick - I thought I'd share what I found.<br> It required finding this nugget - search for dust-x in the page if you're interested. <a href="http://nodejs.debuggable.com/2012-03-23.txt" rel="nofollow">http://nodejs.debuggable.com/2012-03-23.txt</a></p> <p>To resolve things, in your express app</p> <pre><code>cd node_modules git clone git://github.com/laurie71/dust-x.git git clone https://github.com/caolan/dustjs.git </code></pre> <p>The fork of dust.js resolving the require.paths issue with node.js<br> <a href="https://github.com/caolan/dustjs" rel="nofollow">https://github.com/caolan/dustjs</a> </p> <p>The 'wrapper' of dust making it available as a template engine<br> (You'll still need dust.js installed as a module)<br> <a href="https://github.com/laurie71/dust-x" rel="nofollow">https://github.com/laurie71/dust-x</a> </p> <p>The example usage<br> <a href="https://gist.github.com/2174537" rel="nofollow">https://gist.github.com/2174537</a></p> <p>Most important bit:</p> <pre><code>var dustx = require('dust-x'); ... // Configuration app.configure(function(){ app.set('views', __dirname + '/views'); app.register('.dust', dustx/*({})*/); app.set('view engine', 'dust'); // app.set('view engine', 'jade'); app.use(express.bodyParser()); app.use(express.methodOverride()); app.use(app.router); app.use(express['static'](__dirname + '/public')); }); </code></pre> <p>Btw, I think I could have manually fixed the dust.js issue inside its server.js but I wanted to give kudos to the person who actually forked dust.js and made the solution publicly available.</p> <hr> <p>PS: I'm still fairly new to posting on stackoverflow, so if I've breached some etiquette just let me know. I read in the FAQ that answering your own questions is encouraged, so I thought I'd give it a try.</p> <p><em>In particular, I know my formatting is probably weak. In the answer, I actually preferred showing the full link rather than the guide-suggested URL embedding because it reveals structure of the containing sites. With the site URL soaked up in your brain, it gives you more opportunity to the site as reference the next go-around. Also the URLs were reasonably short. ;^) <strong>Suggestions are greatly appreciated</strong>.</em></p> <p><em>What is the way a 'console' is typically formatted? As code?</em></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload