pure.js was designed for the browser and the DOM.
The browser is a decentralized process while the server has it
centralized.
The time pure.js takes to compile and render is irrelevant compared to
other running times, mainly the latency.
On the server you try to shave every milliseconds and bytes for each
in/out requests.
Even if it is technically possible, I'm not sure pure.js, JSDOM,
jQuery and others are right for server side.
Surprisingly, the v1(checkout the branch version1) with all its
clunkiness was designed to generate only HTML strings, no DOM at
rendering.
It was even generating the js source file of the compiled template to
be used as a normal js file.
On Jan 25, 1:13 am, Jeff Barczewski <jeff.barczew...@gmail.com> wrote:
> Mic or all,
> Once you compile a function, does it need document any longer?
> For example:
> var fn = pure(docElement).compile(docDirectives);
> From here on out, does pure still use its reference to document or is it
> compiled to using all strings by this point?
> So when I call
> var output = fn(jsonData); // will document still be used or was it only
> used during compile?
> The reason this is important is because I am looking at how I can use this
> with node.js using precompiled temlplates.
> Thanks for your help!
> Jeff