ariatemplates/attester — pull request #30 by jakub-g (2013-05-30 16:33:41+00:00)
Title: Auto phantom

[Depends on #28].
See aa382d67bfc7485df8f92b51c9a32fcd9a12761e.
---

Add an option to automatically calculate the best number of PhantomJS instances (if `--phantomjs-instances auto` is passed to the script), and to fix incorrect / too big input values.

The CLI parameter is required, because the default is 0 (don't use Phantom).

The number of instances will be constrained to available CPU threads and free memory. Exceeding the resourced results mostly in decreased performance and/or crashes.

Before that, there was a way to set the number of instances by invoking e.g.

`npm config set ariatemplates:phantomjsInstances 8`

but this worked only when running attester via `npm run-script` (the default value in `package.json` had to be 2 due to limitation of Travis CI).