Unitech/PM2 — pull request #838 by Tjatse (2014-11-24 07:11:11+00:00)
Title: Revisions for dev branch

- Reload `env` graceful and peaceful

- Unify `appConf` - rename `ignoreWatch` to `ignore_watch`

- Documents of Schema

- CLI `ignore_watch` supports

- Validate Commander options and JSON key-values

- Divide String to Array more intelligence (ESC supports)

```
$pm2 start test.js --node-args "port=3001 sitename='first pm2 app'"
```

The `nodeArgs` will be

```JSON
[
"port=3001",
"sitename=first pm2 app"
]
```

But not

```JSON
[
"port=3001",
"sitename='first",
"pm2",
"app'"
]
```

- Make options briefness and easy configuration

- min_uptime

Value of `min_uptime` could be:

- **Number**
e.g. `"min_uptime": 3000` means 3000 milliseconds.
- **String**
In the meantime we are making it briefness and easy configuration: `h`, `m` and `s`, e.g.: `"min_uptime": "1h"` means one hour, `"min_uptime": "5m"` means five minutes and `"min_uptime": "10s"` means ten seconds (At last, it will be transformed into milliseconds).

- max_memory_restart

Value of `max_memory_restart` could be:

- **Number**
e.g. `"max_memory_restart": 1024` means 1024 bytes (**NOT BITS**).
- **String**
In the meantime we are making it briefness and easy configuration: `G`, `M` and `K`, e.g.: `"max_memory_restart": "1G"` means one gigabytes, `"max_memory_restart": "5M"` means five megabytes and `"max_memory_restart": "10K"` means ten kilobytes (At last, it will be transformed into byte(s)).

- Refactor start/restart/reload (CLI, JSON), auto inspect configurations by configured schema, more output information, more humanity.