sgentle/phantomjs-node — pull request #169 by winsonwq (2014-05-20 12:06:34+00:00)
Title: Could set options of dnode server

As you might know, `dnode` module has a optional dependency called `weak`, which
needs `node-gyp` compiler while installing on Windows.

`node-gyp` is a good addon compiler, but you need to install VS2010 or
VS2012 (huge installation) on Windows to enable it. That would be a big installation if I
just want to use it.

Because `weak` is just a optional module for `dnode`, why not we could
have more control on `dnode` inside.

Updated when create dnode server in "phantom.coffee" file

```coffee
sock = shoe (stream) ->

d = dnode({}, options.dnodeOpts)

d.on 'remote', (phantom) ->
wrap phantom
phanta.push phantom
cb? phantom

d.pipe stream
stream.pipe d
```

when create phantom object, you could set options for dnode server. so
that we could turn off `weak`, and use `phantomjs-node` in Windows.
```js
var phantom = require('phantom');
phantom.create(function () {
phantom.createPage(function () {
/* */
});
}, {
weak: false
});
```

Already re-generated `shim.js` file.