DoneJS 0.8.0 Release

DoneJS 0.8.0 has been released! Get it from your npms:

npm install -g donejs

Features

can-zone

This release introduces can-zone, a library that is used to provide what is, I can objectively say, the best server-side rendering solution of any JavaScript framework.

For the most part you don’t need to worry about Zones, as done-ssr and done-autorender handle them for you. However, if you ever need to do something like prevent part of your code from slowing down rendering, like if you are using a recursive setTimeout, you can use Zones for that:

var Zone = require("can-zone");

var recursive = Zone.ignore(function(){
  function doStuff(){
    doSomething();
    setTimeout(doStuff, 50);
  }

  doStuff();
});

recursive(); // This will be ignored as part of rendering

can-ssr becomes done-ssr

With the introduction of can-zone, it’s now possible to server-side render a CanJS app without needing to use Steal. See this jQuery example that uses jsdom with can-zone to do server-side rendering.

However, for DoneJS users we still wanted a simpler way. So we moved can-ssr to done-ssr, as this has been, in reality, a DoneJS project all along.

New projects will be initialized with all of the necessary scaffolding, but if you have an existing DoneJS app you need to upgrade you can simply install done-serve:

npm install done-serve --save

And change your scripts section to use done-serve in place of can-serve. See done-ssr for more information.

Sessions

done-ssr now supports sessions, which means you can server-side render logged in pages. See the bitballs example app to see how sessions work in action.

2 Likes