Convert to npm package

Fixes #61