Node.JS + jsdom + PURE

61 views
Skip to first unread message

AJ ONeal

unread,
Nov 19, 2010, 2:16:22 AM11/19/10
to pure-unobtrusive-rendering-engine
I saw that you listed PURE on the Node.JS modules page.

I tried to install it via `npm install pure`, but it's not there.

I've got a little mini-tut on how to add a package to npm if you'd like to do that:
http://coolaj86.info/articles/using-npm-to-package-a-node.js-library.html

AJ ONeal

Mic (BeeBole)

unread,
Nov 19, 2010, 11:22:51 AM11/19/10
to JavaScript Templates Engine PURE
I'm living in the client side, and for too long.
The installation didn't work at the first time, so I dropped it and it
went down in my task list.
I'll check your page to see if I get luckier.

Cheers,
> do that:http://coolaj86.info/articles/using-npm-to-package-a-node.js-library....
>
> AJ ONeal

Mic (BeeBole)

unread,
Nov 20, 2010, 10:00:07 AM11/20/10
to JavaScript Templates Engine PURE
Hi AJ,
If you try now, do you find the npm package?
Thanks for the doc.

On Nov 19, 8:16 am, AJ ONeal <coola...@gmail.com> wrote:
> do that:http://coolaj86.info/articles/using-npm-to-package-a-node.js-library....
>
> AJ ONeal

Elijah Insua

unread,
Nov 20, 2010, 11:50:57 AM11/20/10
to pure-unobtrusive...@googlegroups.com
looks like it worked! thanks Mic!

-- Elijah

>
> AJ ONeal

--
You received this message because you are subscribed to the Google Groups "JavaScript Templates Engine PURE" group.
To post to this group, send email to Pure-Unobtrusive...@googlegroups.com.
To unsubscribe from this group, send email to Pure-Unobtrusive-Rende...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/Pure-Unobtrusive-Rendering-Engine?hl=en.


Elijah Insua

unread,
Nov 20, 2010, 11:56:46 AM11/20/10
to pure-unobtrusive...@googlegroups.com
let me rephrase, `npm install pure` works, but `require('pure')` returns an empty object

-- Elijah

Mic (BeeBole)

unread,
Nov 21, 2010, 4:22:33 AM11/21/10
to JavaScript Templates Engine PURE
ah... still a thing or two to learn about nodejs...
> >> Pure-Unobtrusive-Rende...@googlegroups.com<Pure-Unobtru sive-Rendering-Engine%2Bunsu...@googlegroups.com>
> >> .

deitch

unread,
Nov 21, 2010, 1:47:15 PM11/21/10
to JavaScript Templates Engine PURE
Mic,

Do you have any documentation / examples / tutorial on PURE on NodeJS?
I saw you had a commit a few hours ago supporting node's exports,
would love to see this as an alternative to the rendering engines in
Express - haml, jade, ejs, jquery templates for node, etc. - as PURE
is just so, well, pure. :-)

Mic (BeeBole)

unread,
Nov 21, 2010, 3:09:43 PM11/21/10
to JavaScript Templates Engine PURE
These are my first steps with node.js.
I think the npm package is right now.

Now, I need to learn how to work with jsdom, and how to get the
innerHTML right.
And make some examples.
If anyone did already something, please share.

Brian

unread,
Dec 5, 2010, 2:48:09 PM12/5/10
to JavaScript Templates Engine PURE
I'm interested in using pure with node.js. Anyone have docs on how to
do this?

Joshua Buss

unread,
Dec 5, 2010, 3:10:10 PM12/5/10
to pure-unobtrusive...@googlegroups.com
What exactly are you trying to do?

PURE is good for turning javascript obects into HTML.. Not sure what you'd want to do ths server side for..
To unsubscribe from this group, send email to Pure-Unobtrusive-Rende...@googlegroups.com.

Brian

unread,
Dec 5, 2010, 3:40:13 PM12/5/10
to JavaScript Templates Engine PURE
Ultimately I'm looking for a rendering solution for node that works on
the client side. If that means ONLY works on the client side, so be
it. If it works on server side too, awesome.

I've installed the node package for PURE, but I'm not sure where to go
from there.

Elijah Insua

unread,
Dec 5, 2010, 3:58:50 PM12/5/10
to pure-unobtrusive...@googlegroups.com
I threw together a quick jsdom release (fixes to script loading and such) and a quick proof-o-concept here: https://gist.github.com/729432

You'll need jsdom 0.1.21 (latest), let me know how it works for you!

-- Elijah

Mic (BeeBole)

unread,
Dec 6, 2010, 7:35:32 AM12/6/10
to JavaScript Templates Engine PURE
Thanks Elijah for this starting code.

Brian, I'm not sure how this would be implemented on a server.
I would try to do all the compilation of templates when the server is
started.
Then using closures, the rendering would be "just" running the
compiled function to return HTML.
I'll try to do something from Elijah's code, please share your codes
if you make some trials.

Cheers,
> > Pure-Unobtrusive-Rende...@googlegroups.com<Pure-Unobtru sive-Rendering-Engine%2Bunsu...@googlegroups.com><Pure-Unobtru
> > sive-Rendering-Engine%2Bunsu...@googlegroups.com<sive-Rendering-Engine% 252Buns...@googlegroups.com>
Reply all
Reply to author
Forward
0 new messages