[#34] Add global event support.
[npm] Add main.js as main entry point.
[npm] Remove pgb command-line name.
[cli] Update CLI to use main module.
[spec] Update spec to test module interface.