New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding examples! #577
Adding examples! #577
Conversation
These examples are awesome! Nice work Seth. Sorry you missed your bus. |
var dust = require('dustjs-linkedin'); | ||
|
||
var tmpl = dust.compile("Hello world! Using Dust version {version}!", "hello"); | ||
dust.loadSource(tmpl); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we have the example pre-compile the templates. not a fan of loadsource
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other examples do pre-compile, but this was intended to be the most simple example possible.
How would you want pre-compilation to work? I didn't want to make them run dustc
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right. CJS loading would have been nice. There's compileFn
and renderSource
but both of those use loadSource
underneath.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cjs is on my roadmap yeah.
On Mon, Mar 23, 2015, 7:03 AM Jimmy Chan notifications@github.com wrote:
In examples/basic-node/app.js
#577 (comment):@@ -0,0 +1,12 @@
+var dust = require('dustjs-linkedin');
+
+var tmpl = dust.compile("Hello world! Using Dust version {version}!", "hello");
+dust.loadSource(tmpl);you're right. CJS loading would have been nice. There's compileFn and
renderSource but both of those use loadSource underneath.—
Reply to this email directly or view it on GitHub
https://github.com/linkedin/dustjs/pull/577/files#r26938213.
Simple browser AMD in the browser Super-simple Node Streaming with Express Streaming with Hoffman [ci skip]
looks good thanks 👍 |
Simple browser
AMD in the browser
Super-simple Node
Streaming with Express
Streaming with Hoffman
Closes #575